note 26691 deleted from function.empty by sniper

From: Date: Sat, 23 Aug 2003 00:19:36 +0000
Subject: note 26691 deleted from function.empty by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-54909@lists.php.net to get a copy of this message
Note Submitter: davidmcarthur@mail.com ---- empty($var) is a shorthand for ((isset($var) and $var == FALSE) or !isset($var)) [note there is type casting going on with the ==] which is something that I do *very* frequently as I pass around strings of HTML and arrays full of data and do various things if the string or array "has something in it". Since I often don't know whether a variable is going to be defined yet, this would be a big pain without empty().

« previous php.notes (#54909) next »