Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]
| From: | Timm Friebe | Date: | Thu, 27 Mar 2003 17:10:02 +0000 |
| Subject: | Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR] | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-373@lists.php.net to get a copy of this message | ||
On Thu, 2003-03-27 at 18:04, George Schlossnagle wrote:
> On Thursday, March 27, 2003, at 11:58 AM, Andi Gutmans wrote:
[...]
> I think this can(all) be handled with a custom zend_error_cb anyway (in
> an extension - so that it's available only if you want it.) Looks
> really simple to implement too.
Well, I can think fo the following disadvantages to that:
- Code is less portable (some other user or ISP might not have the
fancy --with-cool-oop extension enabled)
- Within zend_error, all information is lost about the error context.
E.g., if you handle E_ERROR, you will not know if it was an illegal
argument, a call to a member function of a non-object or whatever
else. You only know it was a fatal error.
- Current code relies on the fact that zend_error(E_ERROR, [...]) bails
out. If you start throwing around exceptions instead, this will
probably end up in a big mess:)
Just my 3 cents: Timm