3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Foo { class A { public function hello() { echo __NAMESPACE__; } } } namespace Bar { class B extends \Foo\A { } } $b = new \Bar\B; $b->hello();
Output for 5.3.0 - 5.4.20
Fatal error: No code may exist outside of namespace {} in /in/EPkog on line 21
Process exited with code 255.