note 19000 added to function.func-get-arg

From: Date: Wed, 13 Feb 2002 00:12:37 +0000
Subject: note 19000 added to function.func-get-arg
Groups: php.notes 
Request: Send a blank email to php-notes+get-26535@lists.php.net to get a copy of this message
It should be noted that unset variables will still be returned by func_get_arg(), as shown below: function allSet() { for($i = 0, $j = func_num_args(); $i < $j; $i++) { $thisArg = func_get_arg($i); if(!isset($thisArg)) { return FALSE; } } return TRUE; } $x = 1; $y = 0; $z = "Four score and seven years ago..."; echo (allSet($x, $z) ? 'All' : 'Some') . " vars are set in the first set.<br>\n"; echo (allSet($w, $x, $y, $z) ? 'All' : 'Some') . " vars are set second set.<br>\n"; -- http://www.php.net/manual/en/function.func-get-arg.php http://master.php.net/manage/user-notes.php?action=edit+19000 http://master.php.net/manage/user-notes.php?action=delete+19000 http://master.php.net/manage/user-notes.php?action=reject+19000

« previous php.notes (#26535) next »