Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]

From: Date: Sat, 29 Mar 2003 17:35:48 +0000
Subject: Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-472@lists.php.net to get a copy of this message
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. Zeev

« previous php.internals (#472) next »