3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = '[{"galaxy":"2","content":"1","id":2},{"galaxy":"3","content":"1","id":3}]'; $array = json_decode($string); var_dump($array[0][0]);
based on 1VS77
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /in/BKSX5:6 Stack trace: #0 {main} thrown in /in/BKSX5 on line 6
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Cannot use object of type stdClass as array in /in/BKSX5 on line 6
Process exited with code 255.