3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php trait TA { function foo() {} } trait TB { function foo() {} } trait TC { function foo() {} } class C { use TA, TB, TC { TB::foo insteadof TA; } } $c = new C; $c->foo(); $c->bar(); $c->baz();
based on fCSWR
Output for 7.0.0 - 7.2.0
Fatal error: Trait method foo has not been applied, because there are collisions with other trait methods on C in /in/IXr7l on line 15
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Fatal error: Trait method foo has not been applied, because there are collisions with other trait methods on C in /in/IXr7l on line 19
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/IXr7l on line 3
Process exited with code 255.