3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $items=array([]=>array(["batch_no"]=>'k1',["part_no"]=>1125,["qty"]=>2),array(["batch_no"]=>'J1',["part_no"]=>1125,["qty"]=>4),array(["batch_no"]=>'k1',["part_no"]=>1125,["qty"]=>5)); print_r($items); ?>
based on mMJkg
Output for 7.0.0 - 7.0.2
Fatal error: Illegal offset type in /in/8vMSq on line 3
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Warning: Illegal offset type in /in/8vMSq on line 3 Warning: Illegal offset type in /in/8vMSq on line 3 Warning: Illegal offset type in /in/8vMSq on line 3 Warning: Illegal offset type in /in/8vMSq on line 3 Warning: Illegal offset type in /in/8vMSq on line 3 Warning: Illegal offset type in /in/8vMSq on line 3 Warning: Illegal offset type in /in/8vMSq on line 3 Warning: Illegal offset type in /in/8vMSq on line 3 Warning: Illegal offset type in /in/8vMSq on line 3 Warning: Illegal offset type in /in/8vMSq on line 3 Array ( [0] => Array ( ) [1] => Array ( ) )
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ')' in /in/8vMSq on line 3
Process exited with code 255.