Re: should I be looking to eliminate all notices?
| From: | Justin Frim | Date: | Sat, 21 Apr 2007 23:35:51 +0000 |
| Subject: | Re: should I be looking to eliminate all notices? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-253455@lists.php.net to get a copy of this message | ||
I've always gone by the rule that if you're making software that other people will see or use, make it clean.
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).
In any case, I don't think it's a good idea to rely on users disabling warnings and error messages from their PHP configuration file if you want the code to be portable.
Personally, I leave all errors and warnings turned on, even for public PHP deployments.
Ross wrote:
A quick one this morning. When coding should I be trying to code so there are no notices or is it ok to turn them off. I don't really want to do a isset check for every index I have. Ross