3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Foo { class A { } } namespace Foo\Bar { use Foo\A; class B extends A { } } namespace { use Foo\A; use Foo\Bar\B as Bar\B; $a = new A(); var_dump($a); $b = new Bar\B(); var_dump($b); }
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected '\' (T_NS_SEPARATOR), expecting ',' or ';' in /in/4knOM on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_NS_SEPARATOR, expecting ',' or ';' in /in/4knOM on line 16
Process exited with code 255.