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 TB; } } $c = new C; $c->foo(); $c->bar(); $c->baz();
based on H0EjP
Output for 7.0.0 - 7.2.0
Fatal error: Inconsistent insteadof definition. The method foo is to be used from TB, but TB is also on the exclude list in /in/fCSWR on line 15
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Fatal error: Inconsistent insteadof definition. The method foo is to be used from TB, but TB is also on the exclude list in /in/fCSWR 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/fCSWR on line 3
Process exited with code 255.