<?php
$jsonString = '[{"id":"1","url":"https:\/\/someurl.com\/","starttime":"2010-11-30 16:14:12","finishtime":"2011-09-11 11:32:31","aborted":"0"},{"id":"2","starturl":"http:\/\/someurl.com\/","starttime":"2010-11-30 16:14:12","finishtime":"2013-10-15 14:49:16","aborted":"0"},{"id":"5","starturl":"https:\/\/someurl.com\/","starttime":"2010-11-30 16:14:12","finishtime":"2013-10-17 04:15:58","aborted":"0"}]';
$decodedJson = json_decode($jsonString);
var_dump($decodedJson);
- Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.37, 5.6.0 - 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.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.16, 8.4.1 - 8.4.3
- array(3) {
[0]=>
object(stdClass)#1 (5) {
["id"]=>
string(1) "1"
["url"]=>
string(20) "https://someurl.com/"
["starttime"]=>
string(19) "2010-11-30 16:14:12"
["finishtime"]=>
string(19) "2011-09-11 11:32:31"
["aborted"]=>
string(1) "0"
}
[1]=>
object(stdClass)#2 (5) {
["id"]=>
string(1) "2"
["starturl"]=>
string(19) "http://someurl.com/"
["starttime"]=>
string(19) "2010-11-30 16:14:12"
["finishtime"]=>
string(19) "2013-10-15 14:49:16"
["aborted"]=>
string(1) "0"
}
[2]=>
object(stdClass)#3 (5) {
["id"]=>
string(1) "5"
["starturl"]=>
string(20) "https://someurl.com/"
["starttime"]=>
string(19) "2010-11-30 16:14:12"
["finishtime"]=>
string(19) "2013-10-17 04:15:58"
["aborted"]=>
string(1) "0"
}
}
- Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
- Fatal error: Call to undefined function json_decode() in /in/1rt2j on line 5
Process exited with code 255. - Output for 4.4.5 - 4.4.9
- Fatal error: Call to undefined function: json_decode() in /in/1rt2j on line 5
Process exited with code 255. - Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
- Fatal error: Call to undefined function: json_decode() in /in/1rt2j on line 5
Process exited with code 255. - Output for 4.3.0 - 4.3.1
- Fatal error: Call to undefined function: json_decode() in /in/1rt2j on line 5
preferences:
161.76 ms | 410 KiB | 5 Q