3v4l.org

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