(PHP 7)
To string
public string ReflectionType::__toString ( void )
Gets the parameter type name.
Returns:
Returns the type of the parameter.
Examples:
ReflectionType::__toString() example
<?php function someFunction(string $param) {} $reflectionFunc = new ReflectionFunction('someFunction'); $reflectionParam = $reflectionFunc->getParameters()[0]; echo $reflectionParam->getType();
The above example will output something similar to:
string
See also:
Please login to continue.