I'm not sure that adding this functionality in array_map would actually
execute faster than doing array_combine($keys, array_map(null, $vals,
$vals2, $vals3));. I will need to do some benchmarks to test, but I'm sure
you will only see a performance improvement with extremely large arrays.

Also why change a function to add functionality that can already be
achieved with another existing function? Anybody using array_map is already
aware of it's functionality and what it is used for. To change it to add
other use cases, which is already available with array_combine, will just
be confusing to most developers.

If there is a serious need for multiple arrays for values, then I'd rather
argue that array_combine be modified to accept multiple arrays, which won't
break BC, but I doubt that it would be feasible for the majority developers
to have this feature added, as it is very easily implement in user-land
with a few lines of code.

On Sat, Jan 12, 2013 at 9:41 PM, Thomas Hruska <thru...@cubiclesoft.com>wrote:

> array_combine($keys, array_map(null, $vals, $vals2, $vals3));





Kind Regards
Pierre du Plessis

*Cell*: 072 775 3477
*Fax*: 086 650 4991
*Email*: i...@customscripts.co.za <ad...@customscripts.co.za>
*www*: http://www.customscripts.co.za

Reply via email to