3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?hh class X{} function f(?X $x) {} $r = new ReflectionFunction('f'); $p = $r->getParameters()[0]; var_dump($p->getTypehintText(), $p->getTypeText());
based on XE9a6
Output for 5.4.34 - 5.4.35
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/WvVvY on line 2
Process exited with code 255.
Output for 5.4.0 - 5.4.32
<?hh class X{} function f(?X $x) {} $r = new ReflectionFunction('f'); $p = $r->getParameters()[0]; var_dump($p->getTypehintText(), $p->getTypeText());