3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { public static $a = 'franz'; public setA($v) { self::$a = $v; } } $a = new A; echo $a::$a; $a->setA('cheryl'); $a = new A; echo $a::$a;
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected 'setA' (T_STRING), expecting variable (T_VARIABLE) in /in/ZST4Y on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting T_VARIABLE in /in/ZST4Y on line 7
Process exited with code 255.