note 43861 added to function.array-key-exists

From: Date: Tue, 06 Jul 2004 17:58:20 +0000
Subject: note 43861 added to function.array-key-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-72779@lists.php.net to get a copy of this message
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"... ---- Manual Page -- http://www.php.net/manual/en/function.array-key-exists.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+43861 Delete -- http://master.php.net/manage/user-notes.php?action=delete+43861&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+43861&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#72779) next »