On Wednesday, Oct 8, 2003, at 12:49 Europe/Copenhagen, Zeev Suraski wrote:


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?

No this behavior hasn't been changed. I just thought that no harm would be done if it was changed and no warning was issued.


Edin

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to