PHP | ReflectionClass getEndLine() Function
The ReflectionClass::getEndLine() function is an inbuilt function in PHP which is used to return the line number where the user defined class get ends.
Syntax:
int ReflectionClass::getEndLine( void )
Parameters: This function does not accept any parameters.
Return Value: This function returns the line number where the user defined class get ends.
Below programs illustrate the ReflectionClass::getEndLine() function in PHP:
Program 1:
<?php
class Departments {}
$ReflectionClass = new ReflectionClass( 'Departments' );
$A = $ReflectionClass ->getEndLine();
var_dump( $A );
?>
|
Program 2:
<?php
class Departments {
static $Dept1 = 'CSE' ;
private static $Dept2 = 'ECE' ;
public static $Dept3 = 'EE' ;
}
$ReflectionClass = new ReflectionClass( 'Departments' );
$A = $ReflectionClass ->getEndLine();
var_dump( $A );
?>
|
Reference: https://www.php.net/manual/en/reflectionclass.getendline.php
Last Updated :
30 Nov, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...