3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Bar extends PDO { public function baz() { parent::baz(); } } class PDO { public function baz() { echo __METHOD__; } } namespace Foo { class FooBar exnteds Bar { } } $bar = new Foo\Bar(); $bar->baz();
based on Um224
Output for 7.0.0 - 7.0.2
Parse error: syntax error, unexpected 'exnteds' (T_STRING), expecting '{' in /in/SssVh on line 21
Process exited with code 255.
Output for 5.3.22 - 5.6.17
Fatal error: Namespace declaration statement has to be the very first statement in the script in /in/SssVh on line 20
Process exited with code 255.