array_replace_recursive


array_replace_recursive ( $base = array(), $replacements = array() )

Parameters:
  • (array) $base Array with keys needing to be replaced.
  • (array) $replacements Array with the replaced keys.
See:
Returns:
  • (array)
Defined at:

Description

PHP-agnostic version of {@link array_replace_recursive()}.

The array_replace_recursive() function is a PHP 5.3 function. WordPress currently supports down to PHP 5.2, so this method is a workaround for PHP 5.2.

Note: array_replace_recursive() supports infinite arguments, but for our use- case, we only need to support two arguments.

Subject to removal once WordPress makes PHP 5.3.0 the minimum requirement.

Related Functions

display_space_usage, wp_array_slice_assoc

Top Google Results

User discussions

wpseek mobile