note 46712 added to function.isset

From: Date: Wed, 20 Oct 2004 23:49:48 +0000
Subject: note 46712 added to function.isset
Groups: php.notes 
Request: Send a blank email to php-notes+get-78861@lists.php.net to get a copy of this message
If you use this to check for mutliple variables being set, it will ony return true if ALL of them are set. eg, isset( $var1, $var2, $var3 ) will only return true if all three are set. Great, that's expected, all is well. However, if you want to use it to check if every single one is NOT set... eg !isset( $var1, $var2, $var3 ), it doesn't work as expected, at least to me. I would expect this statement only to be true when ALL three variables are NOT set. However, if only one of them is not set, it will return true. So if you want to check for multiple variables NOT being set, each variable requires its own call to !isset(); That definitely makes me a sad panda :( ---- Manual Page -- http://www.php.net/manual/en/function.isset.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46712 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46712&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46712&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46712&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46712&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46712&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46712&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+46712&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#78861) next »