Re: Re: Fwd: Re: #25494 [Com]: array_merge allowing "false" as argument (silent when non-array is passed)

From: Date: Wed, 08 Oct 2003 10:49:11 +0000
Subject: Re: Re: Fwd: Re: #25494 [Com]: array_merge allowing "false" as argument (silent when non-array is passed)
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-4753@lists.php.net to get a copy of this message
At 11:49 08/10/2003, Edin Kadribasic wrote:
On Wednesday, Oct 8, 2003, at 11:12 Europe/Copenhagen, Zeev Suraski wrote:
The fact of the matter is that other than your opinion (which several people may support), there was and still isn't nothing problematic with silently ignoring NULL arrays.
I hope the same reasoning, which I completely agree with, can be applied to foreach which now spits out a warning for non-arrays. At least reduce the warning to notice. Can you see any harm if foreach silently ignored non-array arguments (as opposed to loudly ignoring them now)?
I think it should ignore NULL values, but non other scalar non array values can be more problematic and probably implies an error. Was this behavior changed in any way in 4.3.x? Zeev

« previous php.internals (#4753) next »