PHP | ReflectionClass getStartLine() Function Last Updated : 30 Nov, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report The ReflectionClass::getStartLine() function is an inbuilt function in PHP which is used to return the line number from where the user defined class get started. Syntax: int ReflectionClass::getStartLine( void ) Parameters: This function does not accept any parameters. Return Value: This function returns the line number from where the user defined class get started. Below programs illustrate the ReflectionClass::getStartLine() function in PHP: Program 1: php <?php // Defining a class named as Departments class Departments {} // Using ReflectionClass over the class Departments $ReflectionClass = new ReflectionClass('Departments'); // Calling getStartLine() functions $A = $ReflectionClass->getStartLine(); // Getting the start line number of // the specified class var_dump($A); ?> Output: int(4) Program 2: php <?php // Defining a class named as Departments class Departments { static $Dept1 = 'CSE'; private static $Dept2 = 'ECE'; public static $Dept3 = 'EE'; } // Using ReflectionClass over the class Departments $ReflectionClass = new ReflectionClass('Departments'); // Calling getStartLine() functions $A = $ReflectionClass->getStartLine(); // Getting the start line number of // the specified class var_dump($A); ?> Output: int(4) Reference: https://www.php.net/manual/en/reflectionclass.getstartline.php Comment More infoAdvertise with us Next Article PHP | ReflectionClass getTraitNames() Function K Kanchan_Ray Follow Improve Article Tags : Web Technologies PHP PHP-function PHP- ReflectionClass PHP- Reflection +1 More Similar Reads 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 li 1 min read PHP | ReflectionClass getTraitAliases() Function The ReflectionClass::getTraitAliases() function is an inbuilt function in PHP which is used to return an array of trait aliases used by the user-defined class.Syntax: array ReflectionClass::getTraitAliases( void ) Parameters: This function does not accept any parameters.Return Value: This function r 1 min read PHP | ReflectionClass getTraitNames() Function The ReflectionClass::getTraitNames() function is an inbuilt function in PHP which is used to return an array of name of traits used by the user-defined class. Syntax: array ReflectionClass::getTraitNames( void ) Parameters: This function does not accept any parameters. Return Value: This function re 1 min read PHP | ReflectionClass getConstant() Function The ReflectionClass::getConstant() function is an inbuilt function in PHP which is used to return the value of the defined constant. Syntax: mixed ReflectionClass::getConstant( string $name ) Parameters: This function accepts a parameter Name which is the name of the defined constant. Return Value: 1 min read PHP | ReflectionClass getConstants() Function The ReflectionClass::getConstants() function is an inbuilt function in PHP which is used to return an array of the specified constant names. Syntax: array ReflectionClass::getConstants( void ) Parameters: This function does not accept any parameter. Return Value: This function returns an array of th 2 min read PHP | ReflectionClass getStaticProperties() Function The ReflectionClass::getStaticProperties() function is an inbuilt function in PHP which is used to return an array of the static properties. This function is not documented currently, but its argument list is available. Syntax: ReflectionClass::getStaticProperties(void) : array Parameters: This func 1 min read Like