On Mon, Mar 16, 2009 at 6:49 PM, Stanislav Malyshev <s...@zend.com> wrote:
> Hi!
>
>> The new parsing API and the strictness of this "return NULL" rule is
>> new and arguable. As it is not that important (work 'round is easy), I
>> tend to prefer to minimize the wtf instead of being too strict.
>
> Minimizing the WTF may also mean standardizing exception handling - i.e.
> knowing what functions actually return when something's wrong without having
> to consult the manual each time.

First it is not an exception. Secondly, as I said earlier already,
this rule is arguable, even more in this particular case.

Return NULL when an argument is missing could be fine but to return
NULL when an argument cannot be processed is not necessary a good
idea. For example: <?php var_dump(is_int($b); ?>, do we want NULL
here?

Cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

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

Reply via email to