3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a=array(); $a[]=array('id'=>1, 'name'=>'aaa'); $a[]=array('id'=>2, 'name'=>'bbb'); print_r($a); echo "\n"; foreach ($a as $b) { echo $b['id']." - ".$b['name']."\n"; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.14.4, 7.0.0 - 7.1.0
Array ( [0] => Array ( [id] => 1 [name] => aaa ) [1] => Array ( [id] => 2 [name] => bbb ) ) 1 - aaa 2 - bbb