3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_export(json_decode('{"options": { "weapons": { "gauntlet": 0.8, "rail": 0.2, "rocket": 0.8 }, "robots": { "life": 1, "heal": [0.1, 0.15, 0.2, 0.3, 0.5, 0.75, 1] }, "minerals": { "score": 3 }, "grid": { "width": 50, "height": 50 }, "sight": { "base": 5, "scan": 10 } }}',true));
Output for 5.2.0 - 5.4.21, hhvm-3.10.0 - 3.12.0, 7.1.0
array ( 'options' => array ( 'weapons' => array ( 'gauntlet' => 0.8, 'rail' => 0.2, 'rocket' => 0.8, ), 'robots' => array ( 'life' => 1, 'heal' => array ( 0 => 0.1, 1 => 0.15, 2 => 0.2, 3 => 0.3, 4 => 0.5, 5 => 0.75, 6 => 1, ), ), 'minerals' => array ( 'score' => 3, ), 'grid' => array ( 'width' => 50, 'height' => 50, ), 'sight' => array ( 'base' => 5, 'scan' => 10, ), ), )
Output for 5.6.28, 7.0.14
array ( 'options' => array ( 'weapons' => array ( 'gauntlet' => 0.80000000000000004, 'rail' => 0.20000000000000001, 'rocket' => 0.80000000000000004, ), 'robots' => array ( 'life' => 1, 'heal' => array ( 0 => 0.10000000000000001, 1 => 0.14999999999999999, 2 => 0.20000000000000001, 3 => 0.29999999999999999, 4 => 0.5, 5 => 0.75, 6 => 1, ), ), 'minerals' => array ( 'score' => 3, ), 'grid' => array ( 'width' => 50, 'height' => 50, ), 'sight' => array ( 'base' => 5, 'scan' => 10, ), ), )
Output for 5.4.38 - 5.6.21, 7.0.0 - 7.0.6
array ( 'options' => array ( 'weapons' => array ( 'gauntlet' => 0.800000000000000044408921, 'rail' => 0.20000000000000001110223, 'rocket' => 0.800000000000000044408921, ), 'robots' => array ( 'life' => 1, 'heal' => array ( 0 => 0.100000000000000005551115, 1 => 0.149999999999999994448885, 2 => 0.20000000000000001110223, 3 => 0.29999999999999998889777, 4 => 0.5, 5 => 0.75, 6 => 1, ), ), 'minerals' => array ( 'score' => 3, ), 'grid' => array ( 'width' => 50, 'height' => 50, ), 'sight' => array ( 'base' => 5, 'scan' => 10, ), ), )
Output for 5.4.22 - 5.4.37
array ( 'options' => array ( 'weapons' => array ( 'gauntlet' => 0.8000000000000000444089209850062616169452667236328125, 'rail' => 0.200000000000000011102230246251565404236316680908203125, 'rocket' => 0.8000000000000000444089209850062616169452667236328125, ), 'robots' => array ( 'life' => 1, 'heal' => array ( 0 => 0.1000000000000000055511151231257827021181583404541015625, 1 => 0.1499999999999999944488848768742172978818416595458984375, 2 => 0.200000000000000011102230246251565404236316680908203125, 3 => 0.299999999999999988897769753748434595763683319091796875, 4 => 0.5, 5 => 0.75, 6 => 1, ), ), 'minerals' => array ( 'score' => 3, ), 'grid' => array ( 'width' => 50, 'height' => 50, ), 'sight' => array ( 'base' => 5, 'scan' => 10, ), ), )
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/mII3D 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/mII3D on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/mII3D 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/mII3D on line 3