3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php trait A { static public $a=2; static public function geta() { return static::$a; } } class B extends A { static public function seta($a ) { self::$a = $a; } } class C extends A { static public function seta($a ) { self::$a = $a; } } B::seta(1); echo C::geta();
Output for 5.4.0 - 5.4.14
Fatal error: Class B cannot extend from trait A in /in/ZXlEu on line 19
Process exited with code 255.
Output for 5.3.0 - 5.3.24
Parse error: syntax error, unexpected T_STRING in /in/ZXlEu on line 3
Process exited with code 255.