ID: 19080 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: All PHP Version: 4.2.2 New Comment:
There is an example in the docs explaining the difference between this on the isset() page. Previous Comments: ------------------------------------------------------------------------ [2002-08-23 19:20:27] [EMAIL PROTECTED] Hello, this code : <?php $a = array(1=>NULL); var_dump($a); var_dump(isset($a[1])); var_dump(array_key_exists(1,$a)); ?> Produces this : array(1) { [1]=> NULL } bool(false) bool(true) So for first time I see difference in the use of isset() and array_key_exists(). Many users (including me till 1 one ago) believe that they are equivalent and because isset() is shorter it is mostly used. Should be there any notice in the docs about this issue? This code is correct and the bug report was inspired by note to do this by jmcastagnetto. Regards, Andrey ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19080&edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php