<?hh
class X<T>{
public function m(T $a){}
}
function f(asdada $x, int $two, ?int $three, @int $four) {}
$r = new ReflectionMethod('X::m');
foreach ($r->getParameters() as $p) {
var_dump($p->getTypehintText(), $p->getTypeText());
echo "\n\n";
}
<?hh
class X<T>{
public function m(T $a){}
}
function f(asdada $x, int $two, ?int $three, @int $four) {}
$r = new ReflectionMethod('X::m');
foreach ($r->getParameters() as $p) {
var_dump($p->getTypehintText(), $p->getTypeText());
echo "\n\n";
}
Output for 8.0.13
Parse error: syntax error, unexpected token "class" in /in/oPKZj on line 2
Process exited with code 255.
Output for 5.4.34 - 5.4.35, 7.3.32 - 7.3.33, 7.4.33
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/oPKZj on line 2
Process exited with code 255.