3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php trait TestTrait { public function out() { echo "Traits!" } } class Test { use TestTrait; } Test::out();
Output for 5.4.0 - 5.4.16
Parse error: syntax error, unexpected '}', expecting ',' or ';' in nSdhT on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.24, 5.3.26
Parse error: syntax error, unexpected T_STRING in nSdhT on line 2
Process exited with code 255.
Output for 5.3.25
Parse error: syntax error, unexpected T_STRING in /in/nSdhT on line 2
Process exited with code 255.