3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array('cifras'=>array(array('ordem'=>1),array('ordem'=>2),array('ordem'=>3))); function abc($item, $key) { echo "$key holds $item\n"; } array_walk($a['cifras'],'abc'); var_dump($a);
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Array to string conversion in /in/1fOCL on line 5 0 holds Array Notice: Array to string conversion in /in/1fOCL on line 5 1 holds Array Notice: Array to string conversion in /in/1fOCL on line 5 2 holds Array array(1) { ["cifras"]=> array(3) { [0]=> array(1) { ["ordem"]=> int(1) } [1]=> array(1) { ["ordem"]=> int(2) } [2]=> array(1) { ["ordem"]=> int(3) } } }
Output for 4.3.0 - 5.3.29
0 holds Array 1 holds Array 2 holds Array array(1) { ["cifras"]=> array(3) { [0]=> array(1) { ["ordem"]=> int(1) } [1]=> array(1) { ["ordem"]=> int(2) } [2]=> array(1) { ["ordem"]=> int(3) } } }