The PHP Online Conference 2021


(No version information available, might only be in Git)

Error::getLineGets the line in which the error occurred


final public Error::getLine ( void ) : int

Get line number where the error occurred.


Această funcție nu are parametri.

Valorile întoarse

Returns the line number where the error occurred.


Example #1 Error::getLine() example

try {
    throw new 
Error("Some error message");
} catch(
Error $e) {
"The error was created on line: " $e->getLine();

Exemplul de mai sus va afișa ceva similar cu:

The error was created on line: 3

A se vedea și

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top