Re: array speed

From: Date: Fri, 06 Apr 2001 00:11:35 +0000
Subject: Re: array speed
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-47354@lists.php.net to get a copy of this message
Just make sure you use foreach() instead of while() when you loop many times. foreach() is roughly 50% faster when I benched them. And never pass type other than object or array. foreach() simply dose not work with error message. (i.e. You will get 'server not found or dns error' or empty output) Regards, -- Yasuo Ohgaki "Kurth Bemis" <kurth@usaexpress.net> wrote in message news:4.3.2.7.2.20010405121439.00b759e0@mail.usaexpress.net... > i'm concerned about the speed at which httpd (with php4.0.1pl1 compiles in > as a static mod) can "chew" through a 350 element 2d array. Can anyone > offer any information? > > ~kurth > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#47354) next »