3v4l.org

run code in 150+ 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 - 5.6.28, 7.0.0 - 7.1.0
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 ( )
Output for hhvm-3.12.0
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: Invalid operand type was used: Invalid type used as key in /in/jm1GT on line 6 Array ( )
Output for hhvm-3.10.0

Process exited with code 153.