RE: [PHP] error_reporting(E_ALL) and undefined vars
| From: | Jon Haworth | Date: | Thu, 07 Feb 2002 17:32:52 +0000 |
| Subject: | RE: [PHP] error_reporting(E_ALL) and undefined vars | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-83881@lists.php.net to get a copy of this message | ||
> I develop with error_reporting(E_ALL). It's a major pain to type everytime
>
> if(isset($some_var))
>
> To avoid undefined variable errors. Any tips? If you turn E_ALL on
> error_reporting, what do you do?
Generally I make sure my variables are defined, and if I can't be sure I
use...
if (isset ($some_var))
That's the *point* of turning on E_ALL. If you don't like it, bump it up to
a higher level.
Cheers
Jon