Re: Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]
| From: | Wez Furlong | Date: | Mon, 31 Mar 2003 11:55:21 +0000 |
| Subject: | Re: Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR] | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-530@lists.php.net to get a copy of this message | ||
How does this differ from the return values of functions using
WRONG_PARAM_COUNT and zend_parse_parameters()?
--Wez
On Sat, 29 Mar 2003, Zeev Suraski wrote:
> At 16:23 29/03/2003, Timm Friebe wrote:
> >On Sat, 2003-03-29 at 13:10, Zeev Suraski wrote:
> >[...]
> > > >After reading through a bunch of mails this generated, I get the idea
> > > >that most people here would be happier with an E_WARNING and the
> > > >function not being executed.
> > >
> > > ?!
> > >
> > > How the heck can we even think about such a thing? When you call a
> > > function, you expect it to run. The code that follows it may rely on
> > stuff
> > > that it has done. Not running it is simply not an option, I can't even
> > > begin to imagine the possible consequences of such an approach!
> >
> >Well, at the moment, the function is not run either, isn't it? The
> >program dies.
>
> Right. Code assuming that it ran successfully is therefore never
> reached. That is fundamentally different from just not running the
> function and returning control to the caller. That's *extremely* dangerous.