Matt Wilmas wrote:
> array_replace() is like the + operator applied to arrays, except that it
> WILL overwrite ("replace") existing entries.

Excuse my ignorance but what's the difference between
        $array = array_replace($array1, $array2);
and
        $array = $array2 + $array1;
apart from different order of the entries in the resulting array?

> array_replace_recursive() will do the same except that it becomes
> recursive only when both the destination and source entries are
> arrays, otherwise the new source entry still replaces any existing
> one.

Hmm, generic enough to be included?

- Chris

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to