3v4l.org

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