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(function($v)use($arr){ return array_combine($arr,$v);}$oldArray); print_r($new_arr);
based on RkJXd
Output for 7.0.0
Parse error: syntax error, unexpected '$oldArray' (T_VARIABLE), expecting ',' or ')' in /in/D5KH4 on line 9
Process exited with code 255.
Output for 5.4.10 - 5.6.16
Parse error: syntax error, unexpected '$oldArray' (T_VARIABLE) in /in/D5KH4 on line 9
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected T_VARIABLE in /in/D5KH4 on line 9
Process exited with code 255.