3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = '{ "smartling": { "en_us" : { 'files': [ { "fileUri": "/dictionaries/sample_en.json", "stringCount": 100, "wordCount": 12540, "approvedStringCount": 100, "completedStringCount": 40, "lastUploaded": "2014-06-12", "fileType": "json", }, ] } } }'; $result = json_decode($string); // Result: object(stdClass)#1 (2) { ["foo"]=> string(3) "bar" ["cool"]=> string(4) "attr" } var_dump($result);
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected 'files' (T_STRING) in /in/XQK8f on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/XQK8f on line 7
Process exited with code 255.