3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array ( 1=>"a", 2=>"b", 3=>"c" ); $d = test($a); echo "d:<br />"; while(list($key, $val)=each($d)) { echo $val." "; } function test($a) { while(list($key, $val)=each($a)) { $a[$key] = $val . "t3"; } return $a; }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
159.92 ms | 2820 KiB | 10 Q