3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = []; $innerkeyArray = ['{"Hello":"Chintan"}']; $array[$innerkeyArray] = ''; print_r($array);
Output for 8.3.0 - 8.3.7
Fatal error: Uncaught TypeError: Cannot access offset of type array on array in /in/UNrcW:5 Stack trace: #0 {main} thrown in /in/UNrcW on line 5
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Fatal error: Uncaught TypeError: Illegal offset type in /in/UNrcW:5 Stack trace: #0 {main} thrown in /in/UNrcW on line 5
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.5 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Warning: Illegal offset type in /in/UNrcW on line 5 Array ( )

preferences:
162.19 ms | 402 KiB | 173 Q