Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]
| From: | Brian Moon | Date: | Fri, 28 Mar 2003 18:17:00 +0000 |
| Subject: | Re: [Zend Engine 2] Re: [PHP-DEV] Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR] | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-440@lists.php.net to get a copy of this message | ||
| I don't like E_ERRORS when there is no real reason to bail out.
| As I've already said, non of the other PHP functions trigger E_ERROR
| when the parameters are incorrect; it's just an E_WARNING and a NULL
| value return.
This is a good point. foreach for example issues a warning. So do all the
array function in PHP. My original RFC on this matter (that had nothing to
do with classes) said to issue a fatal error, but, in retrospect, prehaps it
should be a warning. And include arrays. ;)
Brian.
dealnews.com