|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-09-15 16:05 UTC] joey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 16:00:01 2025 UTC |
There is a huge diference in speed with these two approaches: $file=file("file.txt"); 1. for($i=0;$i<sizeof($file);$i++) ... 2. $file_size=sizeof($file); for($i=0;$i<$file_size;$i++) ... The second approach is much more faster, because the first seems to calculate the 'sizeof' in every iteration.