Open In App

PHP | ReflectionParameter getName() Function

Last Updated : 23 Dec, 2019
Summarize
Comments
Improve
Suggest changes
Share
Like Article
Like
Report
The ReflectionParameter::getName() function is an inbuilt function in PHP which is used to return the name of the specified parameter. Syntax:
 string ReflectionParameter::getName ( void )
Parameters: This function does not accept any parameters. Return Value: This function returns the name of the specified parameter. Below programs illustrate the ReflectionParameter::getName() function in PHP: Program 1:
Output:
string(9) "Parameter"
Program 2:
Output:
string(10) "Parameter1"
string(10) "Parameter3"
string(10) "Parameter6"
Reference: https://www.php.net/manual/en/reflectionparameter.getname.php

Similar Reads