[wp-hackers] overriding pluggable.php functions

Will Anderson wp-hackers at itsananderson.com
Sun Jan 11 00:50:43 GMT 2009


Along with the PHP4 compatibility issue, it's almost always a bad idea to
use exceptions for testing. Exceptions take enough time and memory to
generate that you're usually better off using an if statement if you can. Of
course there are sometimes cases where you can't use an if statement (which
is why exceptions exist in the first place) but avoiding exceptions when you
can is usually a good idea.

On Sat, Jan 10, 2009 at 5:44 PM, Ryan McCue <ryanmccue at cubegames.net> wrote:

> Otto wrote:
> > Alternatively, one could use Exceptions. Raise the exception, catch
> > it, then do the default logic if it's the exception you're looking
> > for. This would be the ideal way, but I'm not sure exceptions are 100%
> > PHP4 compatible in all cases.
> >
>
> Exceptions are PHP5+ only, unfortunately, so they're out of the picture
> until WordPress goes PHP5+ only.
>
> --
> Ryan McCue
> <http://cubegames.net/>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Will Anderson
http://www.itsananderson.com/


More information about the wp-hackers mailing list