[wp-hackers] Why WP_Error Sucks

Andrew Nacin wp at andrewnacin.com
Tue Jul 24 16:31:17 UTC 2012


On Tue, Jul 24, 2012 at 11:32 AM, Brian Layman
<wp-hackers at thecodecave.com>wrote:

> I've not seen any performance tests on PHP to show the speed difference of
> if blocks vs exceptions, but I would be shocked if PHP somehow handled
> exceptions with more efficiency than any of the other languages I've worked
> in.


Nope, they're terribly slow in PHP too. Which is fine if they're only used
for catching critical failures ("exceptional" circumstances). That's not
the case with our WP_Error usage (as I summarized).


More information about the wp-hackers mailing list