note 56482 added to function.empty

From: Date: Sun, 04 Sep 2005 15:51:02 +0000
Subject: note 56482 added to function.empty
Groups: php.notes 
Request: Send a blank email to php-notes+get-94723@lists.php.net to get a copy of this message
The empty() function is compared side-by-side with the isset() function but there is an important difference between them. While isset() allows for multiple variables to be evaluated: $a = "test"; $b = "anothertest"; var_dump(isset($a)); // TRUE var_dump(isset($a, $b)); // TRUE unset ($a); var_dump(isset($a)); // FALSE var_dump(isset($a, $b)); // FALSE However, you cannot use empty in a like way - it only evaluates one at a time. Maybe in the next version... ---- Manual Page -- http://www.php.net/manual/en/function.empty.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56482 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56482&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56482&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56482&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56482&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56482&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56482&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56482&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#94723) next »