SubstrExtensionTest

Obtain filename extension with substr/strrchr


<?php 

$this
->start($loop);

$file '/tmp/'.uniqid().'.jpg';

for (
$i 0$i $this->loop; ++$i) {
    
$value strtolower(substr(strrchr($file'.'), 1));
}

return 
$this->end();
PHP Loops Seconds Percent
8.0.30 10.000 0.002008 +163%
8.0.30 100.000 0.018276 +139%
8.0.9 100.000 0.015204 +116%
8.0.8 100.000 0.020546 +157%
7.3.13 100.000 0.021888 +167%
7.3.12 100.000 0.019827 +151%
7.3.11 100.000 0.015480 +118%
7.2.34 100.000 0.019317 +147%
7.2.33 100.000 0.020157 +154%
7.2.31 100.000 0.020522 +156%
7.2.30 100.000 0.020390 +155%
7.2.29 100.000 0.019800 +151%
7.2.28 100.000 0.021554 +164%
7.2.27 100.000 0.023209 +177%
7.2.26 100.000 0.024189 +184%
7.2.25 100.000 0.019742 +150%
7.2.24 100.000 0.017979 +137%
7.2.22 100.000 0.021430 +163%
7.2.21 100.000 0.020340 +155%
7.1.33 100.000 0.025380 +193%
7.1.32 100.000 0.032967 +251%
7.1.31 100.000 0.030001 +229%
7.1.0 100.000 0.147375 +1123%
7.0.33 100.000 0.025558 +195%
7.0.7 100.000 0.142576 +1087%
5.6.40 100.000 0.054985 +419%
5.6.22 100.000 0.307272 +2342%
5.5.36 100.000 0.332157 +2532%
5.4.45 100.000 0.347990 +2653%
5.3.29 100.000 0.402298 +3067%
8.0.29 10.000 0.001233 100%
8.0.29 100.000 0.013119 100%
8.0.28 100.000 0.014202 +108%
8.0.27 100.000 0.015788 +120%
8.0.26 100.000 0.015437 +118%
8.0.25 100.000 0.016387 +125%
8.0.24 100.000 0.015713 +120%
8.0.23 100.000 0.015616 +119%
8.0.20 100.000 0.013344 +102%
8.0.19 100.000 0.019426 +148%
8.0.17 100.000 0.019823 +151%
8.0.16 100.000 0.017746 +135%
8.0.14 100.000 0.018427 +140%
8.0.11 10.000 0.001961 +159%
8.0.11 100.000 0.017091 +130%
8.0.10 10.000 0.002009 +163%
8.0.10 100.000 0.017240 +131%
7.3.15 100.000 0.017053 +130%
8.0.28 10.000 0.001480 +120%
8.0.27 10.000 0.001990 +161%
8.0.26 10.000 0.001511 +123%
8.0.25 10.000 0.001629 +132%
8.0.24 10.000 0.001667 +135%
8.0.23 10.000 0.001838 +149%
8.0.20 10.000 0.001342 +109%
8.0.19 10.000 0.001789 +145%
8.0.17 10.000 0.001915 +155%
8.0.16 10.000 0.002423 +196%
8.0.14 10.000 0.002089 +169%
7.3.14 100.000 0.022363 +170%
8.0.9 10.000 0.001635 +133%
8.0.7 100.000 0.021037 +160%
8.0.8 10.000 0.001854 +150%
8.0.3 100.000 0.021820 +166%
8.0.2 100.000 0.024741 +189%
8.0.0 100.000 0.017491 +133%
7.4.33 100.000 0.015933 +121%
8.0.7 10.000 0.001925 +156%
7.4.32 100.000 0.015886 +121%
7.4.30 100.000 0.013779 +105%
7.4.29 100.000 0.019921 +152%
7.4.27 100.000 0.018278 +139%
8.0.3 10.000 0.002709 +220%
7.4.28 100.000 0.019241 +147%
7.4.24 100.000 0.017209 +131%
7.4.7 100.000 0.018479 +141%
7.4.6 100.000 0.018517 +141%
7.4.5 100.000 0.018920 +144%
7.4.4 100.000 0.020254 +154%
8.0.2 10.000 0.003261 +264%
8.0.0 10.000 0.002124 +172%
7.4.3 100.000 0.018868 +144%
7.4.33 10.000 0.001781 +144%
7.4.32 10.000 0.001825 +148%
7.4.30 10.000 0.001509 +122%
7.4.29 10.000 0.002040 +165%
7.3.17 100.000 0.020712 +158%
7.3.16 100.000 0.019841 +151%
7.4.28 10.000 0.002034 +165%
7.4.23 100.000 0.017498 +133%
7.4.21 100.000 0.021250 +162%
7.4.20 100.000 0.019811 +151%
7.4.24 10.000 0.001954 +158%
7.4.16 100.000 0.023373 +178%
7.4.15 10.000 0.003441 +279%
7.4.15 100.000 0.026263 +200%
7.4.13 100.000 0.017462 +133%
7.4.27 10.000 0.002149 +174%
7.4.23 10.000 0.001787 +145%
7.4.22 10.000 0.001957 +159%
7.4.22 100.000 0.018331 +140%
7.4.21 10.000 0.002004 +162%
7.4.20 10.000 0.002234 +181%
7.4.16 10.000 0.002569 +208%
7.4.13 10.000 0.001951 +158%
7.4.12 10.000 0.002314 +188%
7.4.12 100.000 0.016476 +126%
7.4.11 100.000 0.015808 +120%
7.4.11 10.000 0.001952 +158%
7.4.10 10.000 0.002020 +164%
7.4.10 100.000 0.018342 +140%
7.4.7 10.000 0.002111 +171%
7.4.6 10.000 0.002100 +170%
7.4.5 10.000 0.002231 +181%
7.4.4 10.000 0.001729 +140%
7.4.2 10.000 0.002347 +190%
7.4.2 100.000 0.020364 +155%
7.4.3 10.000 0.002071 +168%
7.4.1 10.000 0.002026 +164%
7.4.1 100.000 0.021044 +160%
7.4.0 100.000 0.015847 +121%
7.3.33 100.000 0.016661 +127%
7.3.31 100.000 0.018381 +140%
7.3.18 100.000 0.019229 +147%
7.3.33 10.000 0.001837 +149%
7.3.30 100.000 0.018242 +139%
7.4.0 10.000 0.001757 +142%
7.3.31 10.000 0.002045 +166%
7.3.29 10.000 0.001787 +145%
7.3.29 100.000 0.017582 +134%
7.3.28 10.000 0.002137 +173%
7.3.28 100.000 0.020346 +155%
7.3.27 10.000 0.003032 +246%
7.3.27 100.000 0.024310 +185%
7.3.30 10.000 0.001986 +161%
7.3.24 10.000 0.002073 +168%
7.3.24 100.000 0.017526 +134%
7.3.23 10.000 0.002265 +184%
7.3.23 100.000 0.019761 +151%
7.3.22 10.000 0.002343 +190%
7.3.22 100.000 0.018177 +139%
7.3.19 10.000 0.002545 +206%
7.3.19 100.000 0.018192 +139%
7.3.18 10.000 0.002606 +211%
7.3.17 10.000 0.002286 +185%
7.3.9 10.000 0.001997 +162%
7.3.9 100.000 0.018115 +138%
7.3.8 10.000 0.001707 +138%
7.3.8 100.000 0.016626 +127%
7.3.16 10.000 0.001772 +144%
7.3.15 10.000 0.002319 +188%
7.3.14 10.000 0.002599 +211%
7.3.13 10.000 0.002105 +171%
7.3.12 10.000 0.002137 +173%
7.3.11 10.000 0.001808 +147%
7.2.34 10.000 0.002269 +184%
7.2.33 10.000 0.002306 +187%
7.2.31 10.000 0.002521 +204%
7.2.30 10.000 0.001953 +158%
7.2.29 10.000 0.002265 +184%
7.2.28 10.000 0.002541 +206%
7.2.27 10.000 0.003055 +248%
7.2.26 10.000 0.002734 +222%
7.2.25 10.000 0.002136 +173%
7.2.24 10.000 0.001958 +159%
7.2.22 10.000 0.002292 +186%
7.2.21 10.000 0.002131 +173%
7.1.33 10.000 0.003266 +265%
7.1.32 10.000 0.003989 +323%
7.1.31 10.000 0.003274 +265%
7.1.0 10.000 0.015365 +1246%
7.0.33 10.000 0.003264 +265%
7.0.7 10.000 0.015002 +1216%
5.6.40 10.000 0.007856 +637%
5.6.22 10.000 0.031761 +2575%
5.5.36 10.000 0.034742 +2817%
5.4.45 10.000 0.036167 +2932%
5.3.29 10.000 0.045156 +3661%