Created
April 3, 2014 20:55
-
-
Save jmas/9962732 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$timeStart = microtime(true); | |
for ($i=0; $i<1000; $i++) { | |
//glob('./data/4cc3b5c1ba9d60706f182f7960b1266a_75_75_fit_c_0_85.{dat,png,gif}', GLOB_BRACE); | |
if (file_exists('./data/4cc3b5c1ba9d60706f182f7960b1266a_75_75_fit_c_0_85.dat')) { | |
} else if (file_exists('./data/4cc3b5c1ba9d60706f182f7960b1266a_75_75_fit_c_0_85.png')) { | |
} else if (file_exists('./data/4cc3b5c1ba9d60706f182f7960b1266a_75_75_fit_c_0_85.gif')) { | |
} | |
} | |
$timeEnd = microtime(true); | |
$execTime = ($timeEnd - $timeStart); | |
echo $execTime . " msec\n"; | |
// glob | |
// 0.0032610893249512 msec | |
// 0.003046989440918 msec | |
// 0.0030860900878906 msec | |
// file_exists | |
// 0.00088906288146973 msec | |
// 0.00088000297546387 msec | |
// 0.00087404251098633 msec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment