3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php trait A {} trait B extends A {}
Output for 5.4.18 - 5.4.19
Fatal error: A trait (B) cannot extend a class. Traits can only be composed from other traits with the 'use' keyword. Error in /in/YA40B on line 4
Process exited with code 255.
Output for 5.4.1 - 5.4.17
Fatal error: A trait (B) cannot extend a class. Traits can only be composed from other traits with the 'use' keyword. Error in /in/F4IlX on line 4
Process exited with code 255.
Output for 5.4.0
Fatal error: A trait (B) cannot extend a class in /in/F4IlX on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING in /in/F4IlX on line 3
Process exited with code 255.