3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?hh class X{} function f(asdada $x, int $two, ?int $three, @int $four) {} $r = new ReflectionFunction('f'); foreach ($r->getParameters() as $p) { var_dump($p->getTypehintText(), $p->getTypeText()); echo "\n\n"; }
based on 5URRH
Output for 5.4.34 - 5.4.35
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/pnBmH on line 2
Process exited with code 255.
Output for 5.4.0 - 5.4.32
<?hh class X{} function f(asdada $x, int $two, ?int $three, @int $four) {} $r = new ReflectionFunction('f'); foreach ($r->getParameters() as $p) { var_dump($p->getTypehintText(), $p->getTypeText()); echo "\n\n"; }