note 43861 deleted from function.array-key-exists by jome
| From: | jome@php.net | Date: | Fri, 20 Aug 2004 08:49:01 +0000 |
| Subject: | note 43861 deleted from function.array-key-exists by jome | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-74982@lists.php.net to get a copy of this message | ||
Note Submitter: lordfarquaad at notredomaine dot net
----
This function is equivalent to
<?
isset($array[$key]);
?>
The only difference seems to be in the warning messages:
if you use an incorrect $key (= not a string or a number), isset would give you a "Illegal
offset type" warning (in fact it is the passed expression that would generate it) and
array_key_exists would say
"array_key_exists(): The first argument should be either a string or an integer"...