Hello Rob, Tuesday, March 2, 2004, 6:31:28 AM, you wrote:
RP> Let's say, with the default error handler, would it take more RP> overhead for PHP to evaluate all the extra isset() calls and if RP> statements required to eliminate notices or for all the checking RP> it has to do with the notices there. If it isn't considerably more RP> efficient to leave the notices in, then I'd lean towards the side RP> of good practice and code out possible notice errors as I've RP> already begun doing. Don't think of it from a raw speed level - this of it like this: a PHP Notice is a friendly way of PHP telling you that basically your code isn't as good as it should be. You can choose to ignore those nuggets of advice and hide them away in your own error handler, or you can fix your code so they don't happen in the first place. I, and I'm sure many others here code with E_ALL on. If you're concerned about the potential stability of your application, you should too. To directly answer your question though - I see no logical reason why PHP parsing script A that's say 50% longer than script B but contains no errors would be slower than parsing script B just because it's smaller in size. PHP must be using memory to keep track of those errors and notices and bring them to your attention, it must be having to store all of this information internally before finally deciding what to output to the browser. If there are no errors, it won't need to do this. It will be pretty hard to find a script lengthy enough to give this a solid bench test, but I would honestly be amazed if B outperformed A. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php