Re: if(isset($a)) vs if($a)
| From: | CC Zona | Date: | Sun, 16 Sep 2001 16:18:23 +0000 |
| Subject: | Re: if(isset($a)) vs if($a) | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-67502@lists.php.net to get a copy of this message | ||
In article <200109152115.f8FLFUO25531@zeus.mminternet.com>,
maggelet@mminternet.com (Mark) wrote:
> >if(isset($) and !empty($a) and !$a)
>
> this is the same as if(!empty($a))
>
> >or
> >
> >if(isset($) and $a===FALSE)
>
> this is the same as if(empty($a))
(Aside from accidentally omitted the "a" in the var name...oops...)
No, they're not the same thing if you have error reporting set to E_ALL.
If $a is not set, calling empty($a) or !$a produces a warning.
--
CC