3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string='{"responseHeader":{"status":0,"QTime":0,"params":{"q":"94305","wt":"json","rows":"1"}},"response":{"numFound":165,"start":0,"docs":[{"price":"","tags":"ATMs","phone_n":"","location":"37.42409897,-122.1709976 ","store":"Discover ATM","store_id":"478602","state":"CA","latitude":"37.42409897","address":"459 LAGUNITA","zipcode_n":"94305","longitude":"-122.1709976\r","url":"Discover_ATM_459_LAGUNITA_Stanford_CA_94305","city":"Stanford","category":"ATMs","text":["","CA","459 LAGUNITA","94305","Stanford"],"spell":["Discover ATM"]}]}}'; $json=json_decode($string); var_dump($json);
Output for 7.0.0 - 7.0.33, 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)#3 (2) { ["responseHeader"]=> object(stdClass)#1 (3) { ["status"]=> int(0) ["QTime"]=> int(0) ["params"]=> object(stdClass)#2 (3) { ["q"]=> string(5) "94305" ["wt"]=> string(4) "json" ["rows"]=> string(1) "1" } } ["response"]=> object(stdClass)#4 (3) { ["numFound"]=> int(165) ["start"]=> int(0) ["docs"]=> array(1) { [0]=> object(stdClass)#5 (16) { ["price"]=> string(0) "" ["tags"]=> string(4) "ATMs" ["phone_n"]=> string(0) "" ["location"]=> string(25) "37.42409897,-122.1709976 " ["store"]=> string(12) "Discover ATM" ["store_id"]=> string(6) "478602" ["state"]=> string(2) "CA" ["latitude"]=> string(11) "37.42409897" ["address"]=> string(12) "459 LAGUNITA" ["zipcode_n"]=> string(5) "94305" ["longitude"]=> string(13) "-122.1709976 " ["url"]=> string(43) "Discover_ATM_459_LAGUNITA_Stanford_CA_94305" ["city"]=> string(8) "Stanford" ["category"]=> string(4) "ATMs" ["text"]=> array(5) { [0]=> string(0) "" [1]=> string(2) "CA" [2]=> string(12) "459 LAGUNITA" [3]=> string(5) "94305" [4]=> string(8) "Stanford" } ["spell"]=> array(1) { [0]=> string(12) "Discover ATM" } } } } }
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.38, 5.6.0 - 5.6.40
object(stdClass)#1 (2) { ["responseHeader"]=> object(stdClass)#2 (3) { ["status"]=> int(0) ["QTime"]=> int(0) ["params"]=> object(stdClass)#3 (3) { ["q"]=> string(5) "94305" ["wt"]=> string(4) "json" ["rows"]=> string(1) "1" } } ["response"]=> object(stdClass)#4 (3) { ["numFound"]=> int(165) ["start"]=> int(0) ["docs"]=> array(1) { [0]=> object(stdClass)#5 (16) { ["price"]=> string(0) "" ["tags"]=> string(4) "ATMs" ["phone_n"]=> string(0) "" ["location"]=> string(25) "37.42409897,-122.1709976 " ["store"]=> string(12) "Discover ATM" ["store_id"]=> string(6) "478602" ["state"]=> string(2) "CA" ["latitude"]=> string(11) "37.42409897" ["address"]=> string(12) "459 LAGUNITA" ["zipcode_n"]=> string(5) "94305" ["longitude"]=> string(13) "-122.1709976 " ["url"]=> string(43) "Discover_ATM_459_LAGUNITA_Stanford_CA_94305" ["city"]=> string(8) "Stanford" ["category"]=> string(4) "ATMs" ["text"]=> array(5) { [0]=> string(0) "" [1]=> string(2) "CA" [2]=> string(12) "459 LAGUNITA" [3]=> string(5) "94305" [4]=> string(8) "Stanford" } ["spell"]=> array(1) { [0]=> string(12) "Discover ATM" } } } } }
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/tNNuA on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/tNNuA on line 3
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/tNNuA on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/tNNuA on line 3

preferences:
281.39 ms | 401 KiB | 457 Q