note 42849 added to function.array-search
| From: | mattpatmedotcomdotau at rn2 dot php dot net | Date: | Mon, 31 May 2004 23:41:50 +0000 |
| Subject: | note 42849 added to function.array-search | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-70375@lists.php.net to get a copy of this message | ||
I was wondering if array_search used binary or serial search and from the comments here it looks
like it may be binary. However from a quick look at the PHP source code (PHP 4.3.4 and 5RC2) it
uses a hash table which would be quicker than a binary search (in most cases... the worst case is a
serial search...)
----
Manual Page -- http://www.php.net/manual/en/function.array-search.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+42849
Delete -- http://master.php.net/manage/user-notes.php?action=delete+42849&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+42849&report=yes
Search -- http://master.php.net/manage/user-notes.php