> -----Message d'origine-----
> De : Ross [mailto:[EMAIL PROTECTED] 
> Envoyé : samedi 21 avril 2007 11:18
> À : php-general@lists.php.net
> Objet : Re: [PHP] should I be looking to eliminate all notices?
> 
> Should I care? Is it considered bad practice to just turn them off?
> 
> 

Yes you should, if you are using undeclared variables, this could lead to
coding problems, and/or security problems depending on how you have acces to
your php files setup.

As a rule of thumb, i declare all variables and do check isset on my
indexes, so far my framework/cms has over 4000 lines of codes and i adress
each notice and warning accordingly...

But then again, this is just my philosophy its really up to you to decide
how you code, and how to adress issues that emmit notice messages..

If you don't adresse those message then be sure to turn error_reporting off
on your production server.

Besides, using isset is a good way of determining certain "states" of your
programm flow, for me it comes in handy rather then being a long task..
I feel full control over what is happening in your script will lead you to
1. less errors, 2. a better understanding of your script wich then leads
itself into 3. easier debugging

(yup their are a lot of people who have scripts that "work" but don't really
know why! )

Regards,

Tim

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

Reply via email to