3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = new StdClass; $a->a = 1; $a->b = 2; var_dump(json_encode($a)); var_dump(json_encode(array( 'a' => 1, 'b' => 2 ));
Output for 5.3.0 - 5.4.23
Parse error: syntax error, unexpected ';' in /in/0ThXH on line 9
Process exited with code 255.