3v4l.org

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