3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php (new aa)->foo(); class aa { function foo() {} } (new bb)->foo(); interface b {} class bb implements b { function foo() {} } ?>
based on DqBZs
Output for 7.0.28 - 7.3.1
Fatal error: Uncaught Error: Class 'bb' not found in /in/amemp:5 Stack trace: #0 {main} thrown in /in/amemp on line 5
Process exited with code 255.
Output for 5.6.38
Fatal error: Class 'bb' not found in /in/amemp on line 5
Process exited with code 255.