PHP | ReflectionClass getStartLine() Function Last Updated : 30 Nov, 2019 Comments Improve Suggest changes 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 getStartLine() 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 PHP | ReflectionClass getProperties() Function The ReflectionClass::getProperties() function is an inbuilt function in PHP which is used to return an array of the reflected properties. Syntax: ReflectionClass::getProperties($filter) : array Parameters: This function accepts a parameter filter which helps to remove some of the reflected propertie 2 min read PHP | ReflectionClass getConstructor() Function The ReflectionClass::getConstructor() function is an inbuilt function in PHP which is used to return the constructor of the specified class or NULL if the class is not having any constructor. Syntax: ReflectionMethod ReflectionClass::getConstructor( void ) Parameters: This function does not accept a 1 min read PHP | ReflectionClass getFileName() Function The ReflectionClass::getFileName() function is an inbuilt function in PHP which is used to return the filename of the file in which the class has been defined or returns false if the file is not found. Syntax: string ReflectionClass::getFileName( void ) Parameters: This function does not accept any 1 min read PHP | ReflectionClass getParentClass() Function The ReflectionClass::getParentClass() function is an inbuilt function in PHP which is used to return the specified parent class or false if there is no parent class is present. Syntax: ReflectionClass ReflectionClass::getParentClass ( void ) Parameters: This function does not accept any parameters. 2 min read Like