3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = array( 'foo' => 'bar', 'baz' => array( 'test' => 'bat', ), ); $string = json_encode($arr); echo $string, '<br/>'; $json = json_decode($string); $json->stuff->name = 'me'; $json->stuff->description = 'useless; $newJsonString = json_encode($json);
Output for 5.4.0 - 5.4.13
Parse error: syntax error, unexpected ''useless;' (T_ENCAPSED_AND_WHITESPACE) in /in/0I75F on line 14
Process exited with code 255.
Output for 5.3.0 - 5.3.23
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in /in/0I75F on line 14
Process exited with code 255.