note 18755 deleted from function.array-push by philip
| From: | philip@php.net | Date: | Fri, 09 Oct 2009 16:38:59 +0000 |
| Subject: | note 18755 deleted from function.array-push by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-161593@lists.php.net to get a copy of this message | ||
Note Submitter: Static
----
I noticed that when building a large array, array_push($array, $value) didn't seem to be quite
as fast as $array[] = $value. Using the latter would therefore be a useul optimisation if you can
guarantee unique keys (e.g. reading from a DB table with an id field).
Static.