Open In App

PHP | ReflectionParameter getType() Function

Last Updated : 12 Jul, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report
The ReflectionParameter::getType() function is an inbuilt function in PHP which is used to return the type of the specified parameter. Syntax:
ReflectionType ReflectionParameter::getType ( void )
Parameters: This function does not accept any parameters. Return Value: This function returns the type of the specified parameter. Below programs illustrate the ReflectionParameter::getType() function in PHP: Program 1:
Output:
int
Program 2:
Output:
float
Exception
string
Reference: https://www.php.net/manual/en/reflectionparameter.gettype.php

Similar Reads