Re: should I be looking to eliminate all notices?
| From: | Richard Lynch | Date: | Sun, 22 Apr 2007 04:54:05 +0000 |
| Subject: | Re: should I be looking to eliminate all notices? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-253466@lists.php.net to get a copy of this message | ||
On Sat, April 21, 2007 6:35 pm, Justin Frim wrote:
> Sometimes I'll "cheat" and stick a @ symbol in front of a line to shut
> up errors and warnings for that particular line, but usually I only do
> that for speed optimization. (ie. if it's in a short loop that cycles
> many times).
I don't think that's actually an optimization...
PHP still does all the work to generate the error message, and then it
just throws it away.
@ is not "magic" enough to make PHP figure out what errors might
happen and not record them -- It just "traps" the error before it gets
to your eyes and discards it...
So you're making the code slower to add @, not faster...
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?