Re: note 17988 added to aliases

From: Date: Sun, 06 Jan 2002 04:06:54 +0000
Subject: Re: note 17988 added to aliases
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-24457@lists.php.net to get a copy of this message
On 2002-5-01 20:00, dima@php.spb.ru wrote: > count() is alias sizeof()... But sizeof() faster on big arrays (64K+ > num)! > > http://php.spb.ru/php/speed.html#count&sizeof > > Test > for ($it=0; $it<count($bigarray); $it++) {...} > and > for ($it=0; $it<sizeof($bigarray); $it++) {...} sizeof is a direct alias to the count code. It is very unlikely that it will perform differently. :) --zak

« previous php.notes (#24457) next »