3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = array(); $test["abc"] = true; $test["abc"] = $test["abc"] ? $test["abc"] : false; $data = json_encode($test); $test1 = json_decode($data); $val = $test1["abc"]; echo "testabc ".$test['abc']." test1abc ".$test1["abc"];
based on nY0gf
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /in/DmkVI:8 Stack trace: #0 {main} thrown in /in/DmkVI on line 8
Process exited with code 255.
Output for 5.5.0 - 5.6.28
Fatal error: Cannot use object of type stdClass as array in /in/DmkVI on line 8
Process exited with code 255.