getline
Error::getLine
Gets the line in which the error occurred
ENTITY
final
public
int
Error::getLine
Get line number where the error occurred.
ENTITY ENTITY
ENTITY
Returns the line number where the error occurred.
ENTITY
Error::getLine example
<?php
try {
throw new Error("Some error message");
} catch(Error $e) {
echo "The error was created on line: " . $e->getLine();
}
?>
ENTITY
The error was created on line: 3
ENTITY
Throwable::getLine