note 68019 deleted from function.empty by didou

From: Date: Sun, 18 May 2008 00:57:16 +0000
Subject: note 68019 deleted from function.empty by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-139480@lists.php.net to get a copy of this message
Note Submitter: r-u-d-i-e at jouwmoeder dot dot nl ---- The two following methods will do exactly the same, in any case: <?php // CASE 1 if ( empty($var) ) { // do your thing } // CASE 2 if ( !isset($var) || !$var ) { // do that same thing } ?> empty( ) checks for isset AND also the value of the variable (0, "0", "", etc).

« previous php.notes (#139480) next »