3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class foo { private $properties = array( '50_day_ma' => 'foo', 'bar' => 'bar', ); public function __get($var) { return $this->properties[$var]; } } $foo = new foo(); echo $foo->bar, "\n"; echo $foo->50_day_ma, "\n";
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '50' (T_LNUMBER), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /in/UU0GU on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_LNUMBER, expecting T_STRING or T_VARIABLE or '{' or '$' in /in/UU0GU on line 16
Process exited with code 255.