3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(); $a[ array(1,2) ] = array(10,20); $a[ array(3,4) ] = array(30,40); $a[ array(1) ] = array(10); $a[ array(1,2) ][] = 15; print_r($a);
Output for 4.3.0 - 7.1.7
Warning: Illegal offset type in /in/jm1GT on line 3 Warning: Illegal offset type in /in/jm1GT on line 4 Warning: Illegal offset type in /in/jm1GT on line 5 Warning: Illegal offset type in /in/jm1GT on line 6 Array ( )