3v4l.org

run code in 150+ 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 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
baz
Output for hhvm-3.10.0

Process exited with code 137.
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.