3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php trait t { public function dump(){ print_r(array( get_called_class(), __CLASS__ __TRAIT__ )); } }; class foo { } class bar extends foo { use t; } t::dump(); foo::dump(); bar::dump();
Output for 5.4.0 - 5.5.1
Parse error: syntax error, unexpected '__TRAIT__' (T_TRAIT_C), expecting ')' in /in/20JvW on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING in /in/20JvW on line 2
Process exited with code 255.