Re: use PEAR::isError()
| From: | Lukas Smith | Date: | Sun, 06 Feb 2005 03:00:42 +0000 |
| Subject: | Re: use PEAR::isError() | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35968@lists.php.net to get a copy of this message | ||
Alan Knowles wrote:
or doing this is an option. if (is_a($foo,'PEAR_Error')) { which is faster, and doesnt require PEAR to be loaded..Heh .. didnt think you buy into this crap. Course you can do that too.. Funny thing is that is_a() was introduced after isError(). While I doubt we will see any more changes in the PHP 4.3 world I dont think it makes sense to drop the entire OO idea just yet aka encapsulation. Especially since is_a() is deprecated already for PHP5.
....roll on exceptions....Thats a different topic entirely and fairly unrelated to my post. Aside from that people are severely kidding themselves about the benefits of exceptions. When things boil down to it they safe you a few if's while sacrificing alot of flexibility. regards, Lukas