Re: if(isset($a)) vs if($a)

From: Date: Sun, 16 Sep 2001 17:55:00 +0000
Subject: Re: if(isset($a)) vs if($a)
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-67511@lists.php.net to get a copy of this message
On Sun, 16 Sep 2001 09:18:23 -0700, CC Zona wrote: >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. calling empty($a) does not give a warning. -- Mark, maggelet@mminternet.com on 09/16/2001

« previous php.general (#67511) next »