Re: Re: Fwd: Re: #25494 [Com]: array_merge allowing "false" as argument (silent when non-array is passed)
| From: | Brad Fisher | Date: | Tue, 23 Sep 2003 18:32:20 +0000 |
| Subject: | Re: Re: Fwd: Re: #25494 [Com]: array_merge allowing "false" as argument (silent when non-array is passed) | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-4559@lists.php.net to get a copy of this message | ||
Jay Smith wrote:
> The function is called array_merge(), not null_merge() or string_merge().
> The change was to make it act more like other array functions, like
> array_intersect() or array_sum(), which also check parameters for arrays.
>
> What's the consensus? Keep the change or revert? Personally, I think it's
> more consistent if it acts like the other array functions, but if it's
> causing a lot of headaches...
I see no problem with the array_{merge|intersect|diff|flip|etc.} functions
taking non-array parameters, since they all _return_ the resulting array. As
long as they don't promote a non-array variable passed as a parameter into an
array as a side-effect, I don't see the problem. I'd say revert the change and
keep it as it was.
-Brad