Understanding an interesting array update/replace function
- by dave
I'm a PHP amateur.
This array function is an adaption of a function I noticed while reading this article.
I thought this was an interesting type of array function, but I have a question about the way it works.
my_func( array( 'sky' => 'blue' ) );
function my_func( array $settings = array() )
{
$settings = $settings + array(…