Re: PEAR.php to PHP5
| From: | Tomas V.V.Cox | Date: | Sat, 19 Jun 2004 14:10:12 +0000 |
| Subject: | Re: PEAR.php to PHP5 | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30930@lists.php.net to get a copy of this message | ||
Arnaud Limbourg wrote:
ErrorStack is forward compatible with php5. Haven't test it yet but it is designed that way (from what I've read from Greg's posts).The point is that the adoption of ErrorStack would force loads of packages to rewrite its error handling for not saying the huge ammount of apps using the already standard PEAR::isError|raiseError().
It's something like $php_errormsg stackable then? Any usage example?Btw, you'll stick with ErrorStack, without knowing it too much, what does it provide that you can't do with the code I've sent?I prefer the way it manages the stack independently from returns. for example if a method is supposed to return a boolean I prefer to keep it that way instead of returning a PEAR_Error.
It will be faster because it doesn't instantiate a class.As far as I see it instantiates one object per "package". Anyway you only need to include PEAR.php on errors. Not big deal as I always recommend to include it and take advantage of the automatic error handling.
Greg would surely talk about it better than me since my experience with errostack is both recent and limited.AFAIK he's AFK until 4th july :) Tomas V.V.Cox