3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php trait A{ public function a(){} } trait B{ use A; } trait C{ use A; } class D{ use B, C; }
Output for 7.0.0 - 7.2.0
Fatal error: Trait method a has not been applied, because there are collisions with other trait methods on D in /in/F77EG on line 14
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Fatal error: Trait method a has not been applied, because there are collisions with other trait methods on D in /in/F77EG on line 16
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/F77EG on line 2
Process exited with code 255.