note 65586 added to function.each

From: Date: Thu, 04 May 2006 03:29:15 +0000
Subject: note 65586 added to function.each
Groups: php.notes 
Request: Send a blank email to php-notes+get-110491@lists.php.net to get a copy of this message
Regarding the user who states that foreach is faster, this depends on the size of the array you are dealing with. On large arrays while(list($key, $val) = each($array) is considerably faster, as in 10x faster with arrays that number in the millions of elements. ---- Server IP: 216.194.113.175 Probable Submitter: 24.234.191.43 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.each.php Edit -- http://master.php.net/note/edit/65586 Del: integrated -- http://master.php.net/note/delete/65586/integrated Del: useless -- http://master.php.net/note/delete/65586/useless Del: bad code -- http://master.php.net/note/delete/65586/bad+code Del: spam -- http://master.php.net/note/delete/65586/spam Del: non-english -- http://master.php.net/note/delete/65586/non-english Del: in docs -- http://master.php.net/note/delete/65586/in+docs Del: other reasons-- http://master.php.net/note/delete/65586 Reject -- http://master.php.net/note/reject/65586 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#110491) next »