help with fscanf
View Single Post
03-03-2009, 01:31 AM
how quixotic are you?
Join Date: Dec 2007
Location: Lapeer, MI
Attached are the scripts I used to do the same test on a similar file. Takes me about 60 ms to run huge_select.php
Note that this is being run on a ~ 8.5 MB 1 million line file. I also ran these tests on the file listed above.
Run huge_create.php first, then huge_select.php. files.php is a file class I made, file::scan() is a wrapper for the fscanf function. The other php file is the class used for benchmarking.
It worked on my and my friend's server so I'm not crazy. If it doesn't work for you then you are doing something wrong... That or I'm doing something terribly right.
Obviously fscanf was not written in PHP and thus works a lot faster than comparing each string manually with PHP.
(3.3 KB, 12 views)
Dingo Web Systems >
My Website >
View Public Profile
Send a private message to ETbyrne
Visit ETbyrne's homepage!
Find More Posts by ETbyrne