3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait TheErrorOfYourWays{ public function booboo(){ echo 'You had a booboo :('; } } trait SpectacularStuff1 { use TheErrorOfYourWays; } trait SpectacularStuff2 { use TheErrorOfYourWays; } trait SpectacularStuff3 { use TheErrorOfYourWays; } class DoSomethingSpectacular { use SpectacularStuff1, SpectacularStuff2, SpectacularStuff3 } $do = new DoSomethingSpectacular; $do->booboo(); $do->booboo2(); $do->booboo3();
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected '}', expecting ',' or ';' or '{' in /in/iSQja on line 18
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/iSQja on line 2
Process exited with code 255.

preferences:
181.23 ms | 1395 KiB | 64 Q