3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { public static $a; final public static setA($a) { self::$a = $a; } } class B extends A { } A::setA('a'); echo A::$a, "\n"; B::setA('b'); echo A::$a, "\n";
Output for 5.4.0 - 5.4.15
Parse error: syntax error, unexpected 'setA' (T_STRING), expecting variable (T_VARIABLE) in /in/cgiUv on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.25
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/cgiUv on line 6
Process exited with code 255.