#43334 [NEW]: isset behaviour with multiple parameters

From: Date: Mon, 19 Nov 2007 11:59:08 +0000
Subject: #43334 [NEW]: isset behaviour with multiple parameters
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-214@lists.php.net to get a copy of this message
From: nicholsr@php.net Operating system: Irrelevant PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: isset behaviour with multiple parameters Description: ------------ The documentation for isset does not clearly describe the behaviour for multiple parameters. I suggest that the "Description" is revised by adding the following: If multiple parameters are supplied then isset will return TRUE only if all of the parameters are not NULL or unset. I suggest that the "Notes" is revised by adding the following: "If multiple parameters are supplied then isset evaluates them in order left to right. It stops evaluating the parameters as soon as an unset parameter is encountered." Reproduce code: --------------- <?php echo "this generates a warning about b not being set \n"; var_dump (isset ($a[$b])); echo "this generates no warning \n"; var_dump (isset ($c, $a[$b])); ?> Expected result: ---------------- this generates a warning about b not being set PHP Notice: Undefined variable: b in C:\cygwin\home\nicholsr\1.php on line 3 bool(false) this generates no warning bool(false) -- Edit bug report at http://bugs.php.net/?id=43334&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43334&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43334&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43334&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43334&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43334&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43334&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43334&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43334&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43334&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43334&r=support Expected behavior: http://bugs.php.net/fix.php?id=43334&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43334&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43334&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43334&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43334&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43334&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43334&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43334&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43334&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43334&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43334&r=mysqlcfg

« previous php.doc.bugs (#214) next »