[dev] Re: [cvs] commit: ansel image.php
    Mike Cochrane 
    mike at graftonhall.co.nz
       
    Tue Jul 15 05:47:37 PDT 2003
    
    
  
> ----- Message from marioy at upb.edu.co ---------
>
> If Im not wrong, the file() function is way more slower than the
> fopen()-fread() combination (I think I read that in phpdeveloper.com). Maybe
> some beanchmarks should be done.
>
> Regards
> Mario
The file() call that about 3 times longer then file_get_contents(), but the
implode takes _ages_. Here's what xdebug says when I try all three methods
here:
Time Taken      Number of Calls Function Name
1.4918390512    1               implode()
0.0379719734    1               file()
0.0112130642    1               file_get_contents()
0.0002110004    1               fopen()
0.0109100342    1               fread()
0.0001639128    1               filesize()
0.0000849962    1               fclose()
Thanks for pointing that out :-) Now I can't be lazy with reading in files.
- Mike :-)
    
    
More information about the dev
mailing list