3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php trait test{ function foobar() { } }; class test{ use test; } $t = new test; var_dump($t);
Output for 7.0.0 - 7.2.0
Fatal error: Cannot declare class test, because the name is already in use in /in/aQCGq on line 10
Process exited with code 255.
Output for 5.4.0 - 5.6.28
Fatal error: Cannot redeclare class test in /in/aQCGq on line 10
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/aQCGq on line 3
Process exited with code 255.