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(2)); var_dump(a("1"));
based on 35LHG
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(2)); var_dump(a("1"));