3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $pero = array('asd' => array('a' =>'erp', 'b' => 'bb'), 'aa' => array('b' => 'bb2','a' =>'erp2')); $res = array(); foreach($pero as &$val) { unset($val['a']); $res[] = $val; } print_r($pero); print_r($res); ?>
Output for 5.0.0 - 7.1.0
Array ( [asd] => Array ( [b] => bb ) [aa] => Array ( [b] => bb2 ) ) Array ( [0] => Array ( [b] => bb ) [1] => Array ( [b] => bb2 ) )
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /in/BPRja on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected '&', expecting T_VARIABLE or '$' in /in/BPRja on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /in/BPRja on line 5
Process exited with code 255.