3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo($aaa):?float { return 'aaa'; } var_dump(foo(123));
Output for 7.3.0rc3
Fatal error: Uncaught TypeError: Return value of foo() must be of the type float or null, string returned in /in/oG6ij:3 Stack trace: #0 /in/oG6ij(6): foo(123) #1 {main} thrown in /in/oG6ij on line 3
Process exited with code 255.