<?php
$str = "{
"smartling":
{
"en_us" : {
'files': [
{
"fileUri": "/dictionaries/sample_en.json",
"stringCount": 100,
"wordCount": 12540,
"approvedStringCount": 100,
"completedStringCount": 40,
"lastUploaded": "2014-06-12",
"fileType": "json",
},
]
},
"ja-jp": {
'files':[
{
"fileUri": "/dictionaries/sample_jp.json",
"stringCount": 100,
"wordCount": 12540,
"approvedStringCount": 100,
"completedStringCount": 40,
"lastUploaded": "2014-06-12",
"fileType": "json",
}
]
}
}
}";
$dict = json_decode($str);
$count = count($dict['smartling']);
echo $count;
- Output for 5.4.0 - 5.4.29
- Parse error: syntax error, unexpected 'smartling' (T_STRING) in /in/noOiN on line 4
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected T_STRING in /in/noOiN on line 4
Process exited with code 255.
preferences:
184.36 ms | 1395 KiB | 66 Q