<?php
$json = <<<'JSON'
{"code":200,"message":"","time":["2014-07-07 09:00","2014-07-07 09:30","2014-07-07 10:00","2014-07-07 10:30","2014-07-07 11:00","2014-07-07 11:30","2014-07-07 12:00","2014-07-07 12:30","2014-07-07 13:00","2014-07-07 13:30","2014-07-07 14:00","2014-07-07 14:30","2014-07-07 15:00","2014-07-07 15:30","2014-07-07 16:00","2014-07-07 16:30","2014-07-07 17:00","2014-07-07 17:30"]}
JSON;
var_dump(json_decode($json));
- Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- object(stdClass)#1 (3) {
["code"]=>
int(200)
["message"]=>
string(0) ""
["time"]=>
array(18) {
[0]=>
string(16) "2014-07-07 09:00"
[1]=>
string(16) "2014-07-07 09:30"
[2]=>
string(16) "2014-07-07 10:00"
[3]=>
string(16) "2014-07-07 10:30"
[4]=>
string(16) "2014-07-07 11:00"
[5]=>
string(16) "2014-07-07 11:30"
[6]=>
string(16) "2014-07-07 12:00"
[7]=>
string(16) "2014-07-07 12:30"
[8]=>
string(16) "2014-07-07 13:00"
[9]=>
string(16) "2014-07-07 13:30"
[10]=>
string(16) "2014-07-07 14:00"
[11]=>
string(16) "2014-07-07 14:30"
[12]=>
string(16) "2014-07-07 15:00"
[13]=>
string(16) "2014-07-07 15:30"
[14]=>
string(16) "2014-07-07 16:00"
[15]=>
string(16) "2014-07-07 16:30"
[16]=>
string(16) "2014-07-07 17:00"
[17]=>
string(16) "2014-07-07 17:30"
}
}
- Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
- Parse error: syntax error, unexpected T_SL in /in/teRAs on line 2
Process exited with code 255. - Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
- Parse error: parse error, unexpected T_SL in /in/teRAs on line 2
Process exited with code 255. - Output for 4.3.2 - 4.3.4
- Parse error: parse error in /in/teRAs on line 2
Process exited with code 255.
preferences:
252.96 ms | 401 KiB | 360 Q