3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh function a(mixed $a):num { invariant(is_int($a) || is_float($a), "msg"); return $a; } var_dump(a("1"));
based on u8En4
Output for 5.4.34
Parse error: syntax error, unexpected 'function' (T_FUNCTION) in /in/35LHG on line 3
Process exited with code 255.
Output for 5.4.0 - 5.4.32
<?hh function a(mixed $a):num { invariant(is_int($a) || is_float($a), "msg"); return $a; } var_dump(a("1"));