3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $json = <<<JSON { "cpus" : 2, "cpuunits" : 1000, "digest" : "2e9e4e9c57e4c1c2eac905447e71601656e4cc35", "disk" : 200, "hostname" : "ServerFor:dancantir@gmail.com", "ip_address" : "1.2.3.9", "memory" : 2048, "nameserver" : "8.8.8.8", "onboot" : 0, "ostemplate" : "ubuntu-10.04-standard_10.04-4_i386.tar.gz", "quotatime" : 0, "quotaugidlimit" : 0, "searchdomain" : "com", "storage" : "local", "swap" : 2 } { "cpu" : 0, "cpus" : 2, "disk" : 0, "diskread" : 0, "diskwrite" : 0, "failcnt" : 0, "ha" : 0, "ip" : "1.2.3.9", "maxdisk" : 214748364800, "maxmem" : 2147483648, "maxswap" : 2097152, "mem" : 0, "name" : "ServerFor:dancantir@gmail.com", "netin" : 0, "netout" : 0, "nproc" : 0, "status" : "stopped", "swap" : 0, "type" : "openvz", "uptime" : 0 } JSON; var_dump(json_decode($json, true));
Output for 5.2.0 - 5.6.30, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.1.7
NULL
Output for 5.0.0 - 5.1.1, 5.1.3 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/3W6bB on line 7
Process exited with code 255.
Output for 5.1.2
Fatal error: Call to undefined function json_decode() in /in/3W6bB on line 8
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/3W6bB on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.1, 4.4.3 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/3W6bB on line 7
Process exited with code 255.
Output for 4.4.2
Fatal error: Call to undefined function: json_decode() in /in/3W6bB on line 8
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/3W6bB on line 7