php8.5
Home/ Manual/ reflection / reflectionclass/ ReflectionClass::getEndLine

ReflectionClass::getEndLine

PHP function Edit on GitHub ✎

(PHP 5, PHP 7, PHP 8)

Gets end line

Description

ReflectionClass::getEndLine(): int|false

Gets end line number from a user-defined class definition.

Parameters Parameters

Return Values

The ending line number of the user defined class, or false if unknown.

Examples

ReflectionClass::getEndLine example

php
<?php
// Test Class
class TestClass { }

$rc = new ReflectionClass('TestClass');

echo $rc->getEndLine();
?>

The above example will output:

output
3

See Also

  • ReflectionClass::getStartLine

Source: reference/reflection/reflectionclass/getendline.xml · from the official PHP manual (php/doc-en)