3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public function foo() { echo 'bar'; } } trait footrait { public function foo() { parent::foo(); } } class B extends A { use footrait; public function foo() { echo 'baz'; } } $b = new B(); $b->foo();
Output for 5.4.0 - 7.2.0
baz
Output for 5.3.7 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/InmY9 on line 9
Process exited with code 255.