3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php trait foo { } class foo { } class bar extends foo { use foo; } print_r(class_uses(new bar)); print_r(class_uses('bar'));
based on iPmso
Output for 7.0.0 - 7.2.0
Fatal error: Cannot declare class foo, because the name is already in use in /in/cPDPn on line 3
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Fatal error: Cannot redeclare class foo in /in/cPDPn on line 3
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/cPDPn on line 2
Process exited with code 255.