On Tue, 2004-03-02 at 00:19, Rob Paxon wrote:
> Howdy Fellow PHPers,
> I am currently recoding the bulk of my web site network.  One major 
> change is that I finally made a proper error handling system.  To get 
> right down to it, when you use a custom error handler, PHP ignores the 
> error_reporting level you use.  Because of this, all those little 
> "undefined variable" and "undefined index" notices I never, well, 
> noticed, will call my handler.  Of course my handler is currently set to 
> ignore them but it raises a burning question in my mind: 
> 
> Is it more efficient from a performance standpoint to:
> a.) Not use a custom error handler and let PHP do nothing with the 
> notice errors other than notice them.
> b.) User my custom error handler and have it ignore notices.
> c.) Work empty() and isset() into my scripts ever-so gingerly.

It's more efficient not to have a custom error handler... when your code
fires notices and warnings etc. Well written code won't fire any errors
or warnings. Well maintained code won't fire notices. So if you have
well written and well maintained code... the overhead is negligible
since your error handler will never be used except for the odd
notice/warning that you'll be sure to fix if your code is well
maintained :) Personally I like to run with E_ALL enabled.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to