3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(unserialize('a:2:{s:13:"batchcomplete";s:0:"";s:5:"query";a:1:{s:5:"pages";a:1:{i:15580374;a:3:{s:6:"pageid";i:15580374;s:2:"ns";i:0;s:5:"title";s:9:"Main Page";}}}}')); var_dump(json_decode('{ "batchcomplete": "", "query": { "pages": { "15580374": { "pageid": 15580374, "ns": 0, "title": "Main Page" } } } }'));
Output for 7.0.0 - 7.2.0
array(2) { ["batchcomplete"]=> string(0) "" ["query"]=> array(1) { ["pages"]=> array(1) { [15580374]=> array(3) { ["pageid"]=> int(15580374) ["ns"]=> int(0) ["title"]=> string(9) "Main Page" } } } } object(stdClass)#1 (2) { ["batchcomplete"]=> string(0) "" ["query"]=> object(stdClass)#4 (1) { ["pages"]=> object(stdClass)#3 (1) { ["15580374"]=> object(stdClass)#2 (3) { ["pageid"]=> int(15580374) ["ns"]=> int(0) ["title"]=> string(9) "Main Page" } } } }
Output for 5.2.0 - 5.6.28
array(2) { ["batchcomplete"]=> string(0) "" ["query"]=> array(1) { ["pages"]=> array(1) { [15580374]=> array(3) { ["pageid"]=> int(15580374) ["ns"]=> int(0) ["title"]=> string(9) "Main Page" } } } } object(stdClass)#1 (2) { ["batchcomplete"]=> string(0) "" ["query"]=> object(stdClass)#2 (1) { ["pages"]=> object(stdClass)#3 (1) { ["15580374"]=> object(stdClass)#4 (3) { ["pageid"]=> int(15580374) ["ns"]=> int(0) ["title"]=> string(9) "Main Page" } } } }
Output for 5.0.0 - 5.1.6
array(2) { ["batchcomplete"]=> string(0) "" ["query"]=> array(1) { ["pages"]=> array(1) { [15580374]=> array(3) { ["pageid"]=> int(15580374) ["ns"]=> int(0) ["title"]=> string(9) "Main Page" } } } } Fatal error: Call to undefined function json_decode() in /in/KKUYs on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
array(2) { ["batchcomplete"]=> string(0) "" ["query"]=> array(1) { ["pages"]=> array(1) { [15580374]=> array(3) { ["pageid"]=> int(15580374) ["ns"]=> int(0) ["title"]=> string(9) "Main Page" } } } } Fatal error: Call to undefined function: json_decode() in /in/KKUYs on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
array(2) { ["batchcomplete"]=> string(0) "" ["query"]=> array(1) { ["pages"]=> array(1) { [15580374]=> array(3) { ["pageid"]=> int(15580374) ["ns"]=> int(0) ["title"]=> string(9) "Main Page" } } } } Fatal error: Call to undefined function: json_decode() in /in/KKUYs on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
array(2) { ["batchcomplete"]=> string(0) "" ["query"]=> array(1) { ["pages"]=> array(1) { [15580374]=> array(3) { ["pageid"]=> int(15580374) ["ns"]=> int(0) ["title"]=> string(9) "Main Page" } } } } Fatal error: Call to undefined function: json_decode() in /in/KKUYs on line 4