3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /* $o = new stdClass; $id = -99; $a = array('id' => $id, 'name' => 'bill'); $o->$id = $a; var_export($o); */ class Bob { public $-99 = array ( 'id' => -99, 'name' => 'bill', ); } $b = new Bob;
Output for 5.4.0 - 5.4.11
Parse error: syntax error, unexpected '$', expecting variable (T_VARIABLE) in /in/GAlb8 on line 10
Process exited with code 255.
Output for 5.3.0 - 5.3.21
Parse error: syntax error, unexpected '$', expecting T_VARIABLE in /in/GAlb8 on line 10
Process exited with code 255.