note 104995 added to function.array-key-exists
| From: | Anonymous at osu1 dot php dot net | Date: | Thu, 21 Jul 2011 08:46:54 +0000 |
| Subject: | note 104995 added to function.array-key-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181735@lists.php.net to get a copy of this message | ||
Anonymous said:
> I just want to note that array_key_exists() can be extremely slow for large (>200 keys)
> arrays. Use isset($array[$key]) instead!
They do NOT do the same thing:
$a = array('key' => null);
isset($a['key']); // false
array_key_exists('key', $a); // true
----
Server IP: 69.147.83.197
Probable Submitter: 85.189.192.61
----
Manual Page -- http://www.php.net/manual/en/function.array-key-exists.php
Edit -- https://master.php.net/note/edit/104995
Del: integrated -- https://master.php.net/note/delete/104995/integrated
Del: useless -- https://master.php.net/note/delete/104995/useless
Del: bad code -- https://master.php.net/note/delete/104995/bad+code
Del: spam -- https://master.php.net/note/delete/104995/spam
Del: non-english -- https://master.php.net/note/delete/104995/non-english
Del: in docs -- https://master.php.net/note/delete/104995/in+docs
Del: other reasons-- https://master.php.net/note/delete/104995
Reject -- https://master.php.net/note/reject/104995
Search -- https://master.php.net/manage/user-notes.php