3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $oldArray = array( array("country", "state", "city", "name"), array("Argentina", "Corrientes", "Corrientes", "Jorge"), array("Argentina", "Chaco", "Resistencia", "Mariano") ); $arr[] = array_shift($oldArray); $new_arr = array_map('array_combine',&$arr,$oldArray); print_r($new_arr);
based on enHuk
Output for 7.0.0
Parse error: syntax error, unexpected '&' in /in/RkJXd on line 9
Process exited with code 255.
Output for 5.4.10 - 5.6.16
Fatal error: Call-time pass-by-reference has been removed in /in/RkJXd on line 9
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Deprecated: Call-time pass-by-reference has been deprecated in /in/RkJXd on line 9 Warning: array_combine() expects parameter 1 to be array, null given in /in/RkJXd on line 9 Array ( [0] => Array ( [country] => Argentina [state] => Corrientes [city] => Corrientes [name] => Jorge ) [1] => )