note 87661 deleted from function.array-push by danbrown

From: Date: Mon, 15 Dec 2008 18:26:52 +0000
Subject: note 87661 deleted from function.array-push by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148190@lists.php.net to get a copy of this message
Note Submitter: willdemaine at gmail dot com ---- Bryan, the test is focused on the number of elements rather than the speed of an iteration. In the last two examples, 10 items are added per iteration, 10000 times (= 100000 elements). The test shows that for adding one item at a time it's faster to use the [] notation, whereas if you were adding say 10 items at a time, array_push is quicker.

« previous php.notes (#148190) next »