PHP Exception getLine() Method

PHP Exception Reference : Throw an exception and then output the number of the line on which it was thrown

Definition and Usage

The getLine() method returns the line number of the line of code which threw the exception.

Syntax

$exception->getLine()

Technical Details

Return Value: Returns an integer

Related Pages

Read more about Exceptions in our PHP Exceptions Chapter.

❮ PHP Exception Reference