Obtain file extension with explode
<?php
$this->start($loop);
$file = '/tmp/'.uniqid().'.jpg';
for ($i = 0; $i < $this->loop; ++$i) {
$value = explode('.', $file);
$value = strtolower(end($value));
}
return $this->end();
PHP | Loops | Seconds | Percent |
---|---|---|---|
8.3.13 | 100.000 | 0.037656 | 100% |
8.3.10 | 100.000 | 0.031487 | 100% |
8.3.9 | 100.000 | 0.031991 | 100% |
7.3.33 | 100.000 | 0.025312 | 100% |
7.3.31 | 100.000 | 0.025759 | 100% |
7.3.30 | 100.000 | 0.024405 | 100% |
7.3.29 | 100.000 | 0.028518 | 100% |
7.3.28 | 100.000 | 0.025324 | 100% |
7.3.27 | 100.000 | 0.033627 | 100% |
7.3.24 | 100.000 | 0.025016 | 100% |
7.3.23 | 100.000 | 0.030421 | 100% |
7.3.22 | 100.000 | 0.025487 | 100% |
7.3.19 | 100.000 | 0.026279 | 100% |
7.3.18 | 100.000 | 0.026803 | 100% |
7.3.17 | 100.000 | 0.024536 | 100% |
7.3.16 | 100.000 | 0.024233 | 100% |
7.3.15 | 100.000 | 0.024144 | 100% |
7.3.14 | 100.000 | 0.027861 | 100% |
7.3.13 | 100.000 | 0.029404 | 100% |
7.3.12 | 100.000 | 0.025667 | 100% |
7.3.11 | 100.000 | 0.026654 | 100% |
7.3.9 | 100.000 | 0.028014 | 100% |
7.3.8 | 100.000 | 0.028932 | 100% |
7.2.29 | 100.000 | 0.028846 | 100% |
8.3.13 | 10.000 | 0.005530 | +104% |
7.2.34 | 100.000 | 0.028859 | 100% |
7.2.33 | 100.000 | 0.028656 | 100% |
7.2.31 | 100.000 | 0.029160 | 100% |
7.2.30 | 100.000 | 0.027305 | 100% |
8.3.10 | 10.000 | 0.004772 | 100% |
7.2.28 | 100.000 | 0.029996 | 100% |
7.2.27 | 100.000 | 0.031475 | 100% |
7.2.26 | 100.000 | 0.030549 | 100% |
7.2.25 | 100.000 | 0.028726 | 100% |
7.2.24 | 100.000 | 0.028101 | 100% |
7.2.22 | 100.000 | 0.032207 | 100% |
7.2.21 | 100.000 | 0.032535 | 100% |
7.1.33 | 100.000 | 0.029557 | 100% |
7.1.32 | 100.000 | 0.039615 | 100% |
7.1.31 | 100.000 | 0.039830 | 100% |
7.1.0 | 100.000 | 0.210123 | 100% |
7.0.33 | 100.000 | 0.029879 | 100% |
7.0.7 | 100.000 | 0.199901 | 100% |
5.6.40 | 100.000 | 0.075456 | 100% |
5.6.22 | 100.000 | 0.417857 | 100% |
5.5.36 | 100.000 | 0.482106 | 100% |
5.4.45 | 100.000 | 0.486737 | 100% |
5.3.29 | 100.000 | 0.571777 | 100% |
8.3.9 | 10.000 | 0.004670 | 100% |
8.0.30 | 100.000 | 0.028007 | 100% |
8.0.29 | 100.000 | 0.020045 | 100% |
8.0.28 | 100.000 | 0.020525 | 100% |
8.0.27 | 100.000 | 0.022796 | 100% |
8.0.26 | 100.000 | 0.022942 | 100% |
8.0.25 | 100.000 | 0.023503 | 100% |
8.0.24 | 100.000 | 0.021368 | 100% |
8.0.23 | 100.000 | 0.022578 | 100% |
8.0.20 | 10.000 | 0.002268 | 100% |
8.0.20 | 100.000 | 0.019909 | 100% |
8.0.19 | 10.000 | 0.003132 | 100% |
8.0.19 | 100.000 | 0.026962 | 100% |
8.0.17 | 10.000 | 0.003072 | 100% |
8.0.17 | 100.000 | 0.026793 | 100% |
8.0.16 | 10.000 | 0.003460 | 100% |
8.0.16 | 100.000 | 0.023990 | 100% |
8.0.14 | 10.000 | 0.003144 | 100% |
8.0.14 | 100.000 | 0.026921 | 100% |
8.0.11 | 100.000 | 0.024799 | 100% |
8.0.10 | 100.000 | 0.022693 | 100% |
8.0.9 | 100.000 | 0.026177 | 100% |
8.0.8 | 100.000 | 0.028966 | 100% |
8.0.7 | 100.000 | 0.026415 | 100% |
8.0.3 | 100.000 | 0.032321 | 100% |
8.0.2 | 100.000 | 0.037311 | 100% |
8.0.0 | 100.000 | 0.023930 | 100% |
7.4.33 | 100.000 | 0.025444 | 100% |
7.4.32 | 100.000 | 0.022964 | 100% |
7.4.30 | 100.000 | 0.022072 | 100% |
7.4.28 | 100.000 | 0.026116 | 100% |
7.4.27 | 100.000 | 0.026313 | 100% |
7.4.24 | 100.000 | 0.024957 | 100% |
7.4.23 | 100.000 | 0.026202 | 100% |
7.4.22 | 100.000 | 0.023317 | 100% |
8.0.11 | 10.000 | 0.003298 | 100% |
8.0.10 | 10.000 | 0.003404 | 100% |
8.0.0 | 10.000 | 0.003046 | 100% |
7.4.29 | 100.000 | 0.027719 | 100% |
7.4.21 | 10.000 | 0.002821 | 100% |
7.4.21 | 100.000 | 0.030009 | 100% |
7.4.20 | 10.000 | 0.003525 | 100% |
7.4.20 | 100.000 | 0.027165 | 100% |
7.4.16 | 100.000 | 0.031818 | 100% |
7.4.15 | 100.000 | 0.034400 | 100% |
7.4.33 | 10.000 | 0.003426 | 100% |
7.4.32 | 10.000 | 0.002832 | 100% |
7.4.30 | 10.000 | 0.002379 | 100% |
7.4.29 | 10.000 | 0.003482 | 100% |
7.4.24 | 10.000 | 0.003360 | 100% |
7.4.23 | 10.000 | 0.003071 | 100% |
7.4.22 | 10.000 | 0.002731 | 100% |
7.4.13 | 100.000 | 0.023344 | 100% |
7.4.12 | 100.000 | 0.026419 | 100% |
7.4.11 | 100.000 | 0.025302 | 100% |
7.4.10 | 100.000 | 0.026187 | 100% |
8.0.2 | 10.000 | 0.004341 | 100% |
7.4.0 | 100.000 | 0.027438 | 100% |
8.0.30 | 10.000 | 0.003726 | 100% |
8.0.29 | 10.000 | 0.002172 | 100% |
8.0.28 | 10.000 | 0.002518 | 100% |
8.0.27 | 10.000 | 0.003150 | 100% |
8.0.26 | 10.000 | 0.002469 | 100% |
8.0.25 | 10.000 | 0.003013 | 100% |
8.0.24 | 10.000 | 0.002493 | 100% |
8.0.23 | 10.000 | 0.002151 | 100% |
8.0.9 | 10.000 | 0.002820 | 100% |
8.0.8 | 10.000 | 0.003497 | 100% |
8.0.7 | 10.000 | 0.003501 | 100% |
8.0.3 | 10.000 | 0.004227 | 100% |
7.4.28 | 10.000 | 0.003514 | 100% |
7.4.27 | 10.000 | 0.003431 | 100% |
7.4.16 | 10.000 | 0.004370 | 100% |
7.4.15 | 10.000 | 0.005153 | 100% |
7.4.13 | 10.000 | 0.002830 | 100% |
7.4.12 | 10.000 | 0.003072 | 100% |
7.4.11 | 10.000 | 0.003422 | 100% |
7.4.10 | 10.000 | 0.003760 | 100% |
7.4.7 | 10.000 | 0.003245 | 100% |
7.4.7 | 100.000 | 0.026276 | 100% |
7.4.6 | 10.000 | 0.002994 | 100% |
7.4.6 | 100.000 | 0.026536 | 100% |
7.4.5 | 10.000 | 0.003388 | 100% |
7.4.5 | 100.000 | 0.025581 | 100% |
7.4.4 | 10.000 | 0.002670 | 100% |
7.4.4 | 100.000 | 0.025220 | 100% |
7.4.3 | 10.000 | 0.002937 | 100% |
7.4.3 | 100.000 | 0.024286 | 100% |
7.4.1 | 100.000 | 0.029606 | 100% |
7.4.2 | 10.000 | 0.003730 | 100% |
7.4.2 | 100.000 | 0.026107 | 100% |
7.4.1 | 10.000 | 0.004004 | 100% |
7.4.0 | 10.000 | 0.003034 | 100% |
7.3.33 | 10.000 | 0.003162 | 100% |
7.3.31 | 10.000 | 0.003582 | 100% |
7.3.30 | 10.000 | 0.003112 | 100% |
7.3.29 | 10.000 | 0.003028 | 100% |
7.3.28 | 10.000 | 0.003943 | 100% |
7.3.27 | 10.000 | 0.004252 | 100% |
7.3.24 | 10.000 | 0.003233 | 100% |
7.3.23 | 10.000 | 0.003635 | 100% |
7.3.22 | 10.000 | 0.002986 | 100% |
7.3.19 | 10.000 | 0.003534 | 100% |
7.3.18 | 10.000 | 0.004103 | 100% |
7.3.17 | 10.000 | 0.002996 | 100% |
7.3.16 | 10.000 | 0.002911 | 100% |
7.3.15 | 10.000 | 0.003335 | 100% |
7.3.14 | 10.000 | 0.003864 | 100% |
7.3.13 | 10.000 | 0.004050 | 100% |
7.3.12 | 10.000 | 0.003602 | 100% |
7.3.11 | 10.000 | 0.003122 | 100% |
7.3.9 | 10.000 | 0.003397 | 100% |
7.3.8 | 10.000 | 0.003150 | 100% |
7.2.34 | 10.000 | 0.003715 | 100% |
7.2.33 | 10.000 | 0.004091 | 100% |
7.2.31 | 10.000 | 0.003979 | 100% |
7.2.30 | 10.000 | 0.003063 | 100% |
7.2.29 | 10.000 | 0.003539 | 100% |
7.2.28 | 10.000 | 0.003941 | 100% |
7.2.27 | 10.000 | 0.004585 | 100% |
7.2.26 | 10.000 | 0.003980 | 100% |
7.2.25 | 10.000 | 0.003983 | 100% |
7.2.24 | 10.000 | 0.003079 | 100% |
7.2.22 | 10.000 | 0.003788 | 100% |
7.2.21 | 10.000 | 0.003437 | 100% |
7.1.33 | 10.000 | 0.004036 | 100% |
7.1.32 | 10.000 | 0.004521 | 100% |
7.1.31 | 10.000 | 0.004299 | 100% |
7.1.0 | 10.000 | 0.021534 | 100% |
7.0.33 | 10.000 | 0.004026 | 100% |
7.0.7 | 10.000 | 0.020758 | 100% |
5.6.40 | 10.000 | 0.010200 | 100% |
5.6.22 | 10.000 | 0.043318 | 100% |
5.5.36 | 10.000 | 0.049664 | 100% |
5.4.45 | 10.000 | 0.049806 | 100% |
5.3.29 | 10.000 | 0.058022 | 100% |
Obtain filename extension with pathinfo
<?php
$this->start($loop);
$file = '/tmp/'.uniqid().'.jpg';
for ($i = 0; $i < $this->loop; ++$i) {
$value = strtolower(pathinfo($file, PATHINFO_EXTENSION));
}
return $this->end();
PHP | Loops | Seconds | Percent |
---|---|---|---|
8.3.13 | 100.000 | 0.041581 | +110% |
8.3.10 | 100.000 | 0.035921 | +114% |
8.3.9 | 100.000 | 0.036293 | +113% |
7.3.33 | 100.000 | 0.090042 | +356% |
7.3.31 | 100.000 | 0.082633 | +321% |
7.3.30 | 100.000 | 0.082384 | +338% |
7.3.29 | 100.000 | 0.082523 | +289% |
7.3.28 | 100.000 | 0.083270 | +329% |
7.3.27 | 100.000 | 0.107681 | +320% |
7.3.24 | 100.000 | 0.091794 | +367% |
7.3.23 | 100.000 | 0.093163 | +306% |
7.3.22 | 100.000 | 0.093666 | +368% |
7.3.19 | 100.000 | 0.093282 | +355% |
7.3.18 | 100.000 | 0.087247 | +326% |
7.3.17 | 100.000 | 0.084482 | +344% |
7.3.16 | 100.000 | 0.088535 | +365% |
7.3.15 | 100.000 | 0.086117 | +357% |
7.3.14 | 100.000 | 0.090421 | +325% |
7.3.13 | 100.000 | 0.086098 | +293% |
7.3.12 | 100.000 | 0.082651 | +322% |
7.3.11 | 100.000 | 0.100232 | +376% |
7.3.9 | 100.000 | 0.114903 | +410% |
7.3.8 | 100.000 | 0.114667 | +396% |
7.2.29 | 100.000 | 0.088567 | +307% |
8.3.13 | 10.000 | 0.005327 | 100% |
7.2.34 | 100.000 | 0.093883 | +325% |
7.2.33 | 100.000 | 0.092284 | +322% |
7.2.31 | 100.000 | 0.092877 | +319% |
7.2.30 | 100.000 | 0.089291 | +327% |
8.3.10 | 10.000 | 0.004832 | +101% |
7.2.28 | 100.000 | 0.092411 | +308% |
7.2.27 | 100.000 | 0.098527 | +313% |
7.2.26 | 100.000 | 0.093709 | +307% |
7.2.25 | 100.000 | 0.084163 | +293% |
7.2.24 | 100.000 | 0.098803 | +352% |
7.2.22 | 100.000 | 0.121459 | +377% |
7.2.21 | 100.000 | 0.119639 | +368% |
7.1.33 | 100.000 | 0.099360 | +336% |
7.1.32 | 100.000 | 0.126720 | +320% |
7.1.31 | 100.000 | 0.126572 | +318% |
7.1.0 | 100.000 | 0.346409 | +165% |
7.0.33 | 100.000 | 0.100877 | +338% |
7.0.7 | 100.000 | 0.334298 | +167% |
5.6.40 | 100.000 | 0.129022 | +171% |
5.6.22 | 100.000 | 0.489942 | +117% |
5.5.36 | 100.000 | 0.567422 | +118% |
5.4.45 | 100.000 | 0.551170 | +113% |
5.3.29 | 100.000 | 0.731934 | +128% |
8.3.9 | 10.000 | 0.005543 | +119% |
8.0.30 | 100.000 | 0.099116 | +354% |
8.0.29 | 100.000 | 0.077406 | +386% |
8.0.28 | 100.000 | 0.075548 | +368% |
8.0.27 | 100.000 | 0.079777 | +350% |
8.0.26 | 100.000 | 0.080418 | +351% |
8.0.25 | 100.000 | 0.075568 | +322% |
8.0.24 | 100.000 | 0.075196 | +352% |
8.0.23 | 100.000 | 0.078425 | +347% |
8.0.20 | 10.000 | 0.009360 | +413% |
8.0.20 | 100.000 | 0.077225 | +388% |
8.0.19 | 10.000 | 0.013012 | +415% |
8.0.19 | 100.000 | 0.081811 | +303% |
8.0.17 | 10.000 | 0.012843 | +418% |
8.0.17 | 100.000 | 0.088623 | +331% |
8.0.16 | 10.000 | 0.013252 | +383% |
8.0.16 | 100.000 | 0.084675 | +353% |
8.0.14 | 10.000 | 0.013852 | +441% |
8.0.14 | 100.000 | 0.090697 | +337% |
8.0.11 | 100.000 | 0.081230 | +328% |
8.0.10 | 100.000 | 0.080948 | +357% |
8.0.9 | 100.000 | 0.093544 | +357% |
8.0.8 | 100.000 | 0.118480 | +409% |
8.0.7 | 100.000 | 0.082498 | +312% |
8.0.3 | 100.000 | 0.102090 | +316% |
8.0.2 | 100.000 | 0.119326 | +320% |
8.0.0 | 100.000 | 0.087185 | +364% |
7.4.33 | 100.000 | 0.092331 | +363% |
7.4.32 | 100.000 | 0.079514 | +346% |
7.4.30 | 100.000 | 0.082130 | +372% |
7.4.28 | 100.000 | 0.090805 | +348% |
7.4.27 | 100.000 | 0.088597 | +337% |
7.4.24 | 100.000 | 0.086486 | +347% |
7.4.23 | 100.000 | 0.090776 | +346% |
7.4.22 | 100.000 | 0.082814 | +355% |
8.0.11 | 10.000 | 0.013409 | +407% |
8.0.10 | 10.000 | 0.013517 | +397% |
8.0.0 | 10.000 | 0.013554 | +445% |
7.4.29 | 100.000 | 0.086526 | +312% |
7.4.21 | 10.000 | 0.015094 | +535% |
7.4.21 | 100.000 | 0.091535 | +305% |
7.4.20 | 10.000 | 0.014409 | +409% |
7.4.20 | 100.000 | 0.087141 | +321% |
7.4.16 | 100.000 | 0.106543 | +335% |
7.4.15 | 100.000 | 0.132653 | +386% |
7.4.33 | 10.000 | 0.012210 | +356% |
7.4.32 | 10.000 | 0.010505 | +371% |
7.4.30 | 10.000 | 0.011088 | +466% |
7.4.29 | 10.000 | 0.015470 | +444% |
7.4.24 | 10.000 | 0.012984 | +386% |
7.4.23 | 10.000 | 0.013752 | +448% |
7.4.22 | 10.000 | 0.014031 | +514% |
7.4.13 | 100.000 | 0.086432 | +370% |
7.4.12 | 100.000 | 0.103048 | +390% |
7.4.11 | 100.000 | 0.099959 | +395% |
7.4.10 | 100.000 | 0.083920 | +320% |
8.0.2 | 10.000 | 0.017731 | +408% |
7.4.0 | 100.000 | 0.108346 | +395% |
8.0.30 | 10.000 | 0.014003 | +376% |
8.0.29 | 10.000 | 0.008661 | +399% |
8.0.28 | 10.000 | 0.010022 | +398% |
8.0.27 | 10.000 | 0.011448 | +363% |
8.0.26 | 10.000 | 0.012939 | +524% |
8.0.25 | 10.000 | 0.011053 | +367% |
8.0.24 | 10.000 | 0.009584 | +384% |
8.0.23 | 10.000 | 0.009214 | +428% |
8.0.9 | 10.000 | 0.013118 | +465% |
8.0.8 | 10.000 | 0.012429 | +355% |
8.0.7 | 10.000 | 0.015659 | +447% |
8.0.3 | 10.000 | 0.016233 | +384% |
7.4.28 | 10.000 | 0.013679 | +389% |
7.4.27 | 10.000 | 0.014168 | +413% |
7.4.16 | 10.000 | 0.017113 | +392% |
7.4.15 | 10.000 | 0.025756 | +500% |
7.4.13 | 10.000 | 0.013216 | +467% |
7.4.12 | 10.000 | 0.012510 | +407% |
7.4.11 | 10.000 | 0.012596 | +368% |
7.4.10 | 10.000 | 0.013487 | +359% |
7.4.7 | 10.000 | 0.013797 | +425% |
7.4.7 | 100.000 | 0.089956 | +342% |
7.4.6 | 10.000 | 0.015319 | +512% |
7.4.6 | 100.000 | 0.087939 | +331% |
7.4.5 | 10.000 | 0.014329 | +423% |
7.4.5 | 100.000 | 0.086903 | +340% |
7.4.4 | 10.000 | 0.013570 | +508% |
7.4.4 | 100.000 | 0.086584 | +343% |
7.4.3 | 10.000 | 0.013641 | +464% |
7.4.3 | 100.000 | 0.082354 | +339% |
7.4.1 | 100.000 | 0.088799 | +300% |
7.4.2 | 10.000 | 0.015773 | +423% |
7.4.2 | 100.000 | 0.088796 | +340% |
7.4.1 | 10.000 | 0.016418 | +410% |
7.4.0 | 10.000 | 0.013026 | +429% |
7.3.33 | 10.000 | 0.012440 | +393% |
7.3.31 | 10.000 | 0.013667 | +382% |
7.3.30 | 10.000 | 0.014437 | +464% |
7.3.29 | 10.000 | 0.011854 | +391% |
7.3.28 | 10.000 | 0.014898 | +378% |
7.3.27 | 10.000 | 0.017300 | +407% |
7.3.24 | 10.000 | 0.012879 | +398% |
7.3.23 | 10.000 | 0.015241 | +419% |
7.3.22 | 10.000 | 0.014935 | +500% |
7.3.19 | 10.000 | 0.014774 | +418% |
7.3.18 | 10.000 | 0.013314 | +325% |
7.3.17 | 10.000 | 0.013502 | +451% |
7.3.16 | 10.000 | 0.013016 | +447% |
7.3.15 | 10.000 | 0.013189 | +395% |
7.3.14 | 10.000 | 0.016585 | +429% |
7.3.13 | 10.000 | 0.016235 | +401% |
7.3.12 | 10.000 | 0.014139 | +392% |
7.3.11 | 10.000 | 0.011324 | +363% |
7.3.9 | 10.000 | 0.013283 | +391% |
7.3.8 | 10.000 | 0.012342 | +392% |
7.2.34 | 10.000 | 0.013120 | +353% |
7.2.33 | 10.000 | 0.012859 | +314% |
7.2.31 | 10.000 | 0.014920 | +375% |
7.2.30 | 10.000 | 0.014543 | +475% |
7.2.29 | 10.000 | 0.013883 | +392% |
7.2.28 | 10.000 | 0.013888 | +352% |
7.2.27 | 10.000 | 0.017342 | +378% |
7.2.26 | 10.000 | 0.017253 | +433% |
7.2.25 | 10.000 | 0.014745 | +370% |
7.2.24 | 10.000 | 0.011917 | +387% |
7.2.22 | 10.000 | 0.014172 | +374% |
7.2.21 | 10.000 | 0.012781 | +372% |
7.1.33 | 10.000 | 0.014464 | +358% |
7.1.32 | 10.000 | 0.014109 | +312% |
7.1.31 | 10.000 | 0.013476 | +314% |
7.1.0 | 10.000 | 0.036450 | +169% |
7.0.33 | 10.000 | 0.014360 | +357% |
7.0.7 | 10.000 | 0.035616 | +172% |
5.6.40 | 10.000 | 0.017295 | +170% |
5.6.22 | 10.000 | 0.051457 | +119% |
5.5.36 | 10.000 | 0.057179 | +115% |
5.4.45 | 10.000 | 0.056120 | +113% |
5.3.29 | 10.000 | 0.079160 | +136% |