At 14:34 08/10/2003, Ilia Alshanetsky wrote:
On October 8, 2003 05:12 am, 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.

Jay's patch was already reverted by Jani so arguing this point is mostly moot.

Cool, I missed that, but I think it's important to have a general guideline for future cases either way.


However, please note the following:
1) Functionality was NOT changed in 4.3.4 a mere advisory was added indicated
a behavior change in PHP5.

What do you mean by a mere advisory?


2) Nearly every single array function will return E_WARNING when it encounters
and argument that is not an array or an object.
3) New argument parsing API when told to expect an array "a" will return an
error when a non-array value is provided.

Quite possible, but it's still debatable whether it should be that way or not.
Speaking of consistency, the class type hints in ZE2 don't prevent you (at least by default) the ability to pass in NULL values. Extending this to the way arrays are handled in builtin functions makes sense to me.


Zeev

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



Reply via email to