This RFC trying to simpliy and cleanup the coercison rules, having two
different conversion rules for NULL->scalar
depending on userland or internal is counter-productive and bad. The
behavior you describe as null being
empty value is wide-spread in PHP userland code as well.

I agree here with Benjamin. The thing I have wanted in user land for years is to be able to build a user land function that worked the way internal functions do in terms of type checking without having to build my own type checking system. Having internal functions convert null to a scalar and not having user land do the same creates an inconsistency. For example, sometimes you want to wrap/extend an internal function (you see it a lot with json* to do encoding checking). I can't reliably take the same input to my user land wrapper that I can send to the internal function. I would prefer to see the same rules apply to internal and user land.

--

Brian.
--------
http://brian.moonspot.net/

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

Reply via email to