3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Foo { use Foo as Bar; class Baz extends Bar { } } namespace Foo { class Bar { } }
Output for 7.3.0alpha1 - 7.3.0rc3
Fatal error: Uncaught Error: Class 'Foo' not found in /in/Bmfdf:5 Stack trace: #0 {main} thrown in /in/Bmfdf on line 5
Process exited with code 255.
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
Fatal error: Class 'Foo' not found in /in/Bmfdf on line 5
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: unknown class Foo in /in/Bmfdf:5 Stack trace: #0 {main}
Process exited with code 255.