array_replace_recursive() wordpress function and usage This text is not used because the data attribute has a value

array_replace_recursive() wordpress function and usage

Home / WordPress / WordPress Wiki / array_replace_recursive() wordpress function and usage

array_replace_recursive( array $base = array(), array $replacements = array() )
PHP-agnostic version of {@link array_replace_recursive()}.

Description

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.

See also

  • https://secure.php.net/manual/en/function.array-replace-recursive.php#109390

Parameters

$base

(array) (Optional) Array with keys needing to be replaced.

Default value: array()

$replacements

(array) (Optional) Array with the replaced keys.

Default value: array()

Return

(array)

 

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments