(PHP 7)
ReflectionType::__toString — To string
Gets the parameter type name.
이 함수는 인수가 없습니다.
Returns the type of the parameter.
Example #1 ReflectionType::__toString() example
<?php
function someFunction(string $param) {}
$reflectionFunc = new ReflectionFunction('someFunction');
$reflectionParam = $reflectionFunc->getParameters()[0];
echo $reflectionParam->getType();
위 예제의 출력 예시:
string