StrReplaceTest

Replace a text with str_replace


<?php 

$text 
$this->getTextLarge();

$this->start($loop);

for (
$i 0$i $this->loop; ++$i) {
    
$value str_replace('Lorem ipsum''Ipsum lorem'$text);
}

return 
$this->end();
PHP Loops Seconds Percent
8.3.13 100.000 0.127637 +181%
8.3.10 100.000 0.122604 +191%
8.3.9 100.000 0.117591 +171%
7.3.33 100.000 0.109540 +211%
7.3.31 100.000 0.108788 +206%
7.3.30 100.000 0.109196 +245%
7.3.29 100.000 0.110520 +236%
7.3.28 100.000 0.110520 +214%
7.3.27 100.000 0.136551 +231%
7.3.24 100.000 0.112310 +198%
7.3.23 100.000 0.116295 +190%
7.3.22 100.000 0.111253 +193%
7.3.19 100.000 0.114518 +199%
7.3.18 100.000 0.110690 +240%
7.3.17 100.000 0.105156 +209%
7.3.16 100.000 0.107194 +237%
7.3.15 100.000 0.107951 +240%
7.3.14 100.000 0.112270 +224%
7.3.13 100.000 0.113318 +214%
7.3.12 100.000 0.107324 +200%
7.3.11 100.000 0.159717 +155%
7.3.9 100.000 0.206405 +151%
7.3.8 100.000 0.205394 +146%
7.2.29 100.000 0.109563 100%
8.3.13 10.000 0.014704 +162%
7.2.34 100.000 0.113178 100%
7.2.33 100.000 0.110288 100%
7.2.31 100.000 0.111477 100%
7.2.30 100.000 0.110113 100%
8.3.10 10.000 0.015598 +171%
7.2.28 100.000 0.107163 100%
7.2.27 100.000 0.110673 100%
7.2.26 100.000 0.111914 100%
7.2.25 100.000 0.104776 100%
7.2.24 100.000 0.158726 100%
7.2.22 100.000 0.205707 100%
7.2.21 100.000 0.203741 100%
7.1.33 100.000 0.114062 100%
7.1.32 100.000 0.214367 100%
7.1.31 100.000 0.207255 100%
7.1.0 100.000 0.441542 +126%
7.0.33 100.000 0.118666 100%
7.0.7 100.000 0.417670 +124%
5.6.40 100.000 0.058761 100%
5.6.22 100.000 0.243974 100%
5.5.36 100.000 0.259998 100%
5.4.45 100.000 0.272093 100%
5.3.29 100.000 0.431628 100%
8.3.9 10.000 0.015126 +200%
8.0.30 100.000 0.113751 +206%
8.0.29 100.000 0.100080 +217%
8.0.28 100.000 0.104130 +228%
8.0.27 100.000 0.110327 +215%
8.0.26 100.000 0.111526 +204%
8.0.25 100.000 0.107543 +214%
8.0.24 100.000 0.104667 +223%
8.0.23 100.000 0.101350 +213%
8.0.20 10.000 0.012093 +196%
8.0.20 100.000 0.100743 +216%
8.0.19 10.000 0.017472 +203%
8.0.19 100.000 0.109188 +202%
8.0.17 10.000 0.017809 +206%
8.0.17 100.000 0.111426 +192%
8.0.16 10.000 0.016258 +146%
8.0.16 100.000 0.113215 +165%
8.0.14 10.000 0.018141 +202%
8.0.14 100.000 0.112522 +194%
8.0.11 100.000 0.109197 +201%
8.0.10 100.000 0.109476 +224%
8.0.9 100.000 0.108773 +239%
8.0.8 100.000 0.121956 +248%
8.0.7 100.000 0.113705 +203%
8.0.3 100.000 0.134497 +236%
8.0.2 100.000 0.159844 +224%
8.0.0 100.000 0.111189 +203%
7.4.33 100.000 0.109958 +210%
7.4.32 100.000 0.105031 +220%
7.4.30 100.000 0.104564 +232%
7.4.28 100.000 0.108225 +188%
7.4.27 100.000 0.112249 +178%
7.4.24 100.000 0.108064 +196%
7.4.23 100.000 0.118540 +261%
7.4.22 100.000 0.109274 +235%
8.0.11 10.000 0.017256 +185%
8.0.10 10.000 0.017519 +214%
8.0.0 10.000 0.016773 +193%
7.4.29 100.000 0.109046 +207%
7.4.21 10.000 0.019746 +245%
7.4.21 100.000 0.109180 +223%
7.4.20 10.000 0.018053 +244%
7.4.20 100.000 0.111639 +228%
7.4.16 100.000 0.134280 +236%
7.4.15 100.000 0.155655 +234%
7.4.33 10.000 0.013240 +206%
7.4.32 10.000 0.014333 +211%
7.4.30 10.000 0.012880 +217%
7.4.29 10.000 0.018403 +208%
7.4.24 10.000 0.017577 +208%
7.4.23 10.000 0.016301 +245%
7.4.22 10.000 0.016293 +218%
7.4.13 100.000 0.112263 +205%
7.4.12 100.000 0.114470 +197%
7.4.11 100.000 0.111299 +198%
7.4.10 100.000 0.114583 +209%
8.0.2 10.000 0.020642 +214%
7.4.0 100.000 0.180565 +150%
8.0.30 10.000 0.013488 +185%
8.0.29 10.000 0.011424 +202%
8.0.28 10.000 0.012536 +212%
8.0.27 10.000 0.013529 +209%
8.0.26 10.000 0.014942 +210%
8.0.25 10.000 0.012940 +177%
8.0.24 10.000 0.013353 +214%
8.0.23 10.000 0.012904 +233%
8.0.9 10.000 0.015496 +217%
8.0.8 10.000 0.020160 +272%
8.0.7 10.000 0.018156 +223%
8.0.3 10.000 0.020780 +226%
7.4.28 10.000 0.016210 +189%
7.4.27 10.000 0.017555 +186%
7.4.16 10.000 0.020532 +228%
7.4.15 10.000 0.022369 +213%
7.4.13 10.000 0.015595 +200%
7.4.12 10.000 0.013846 +153%
7.4.11 10.000 0.017607 +215%
7.4.10 10.000 0.014065 +172%
7.4.7 10.000 0.016840 +206%
7.4.7 100.000 0.113318 +206%
7.4.6 10.000 0.016868 +214%
7.4.6 100.000 0.108714 +229%
7.4.5 10.000 0.017923 +238%
7.4.5 100.000 0.110875 +250%
7.4.4 10.000 0.015629 +197%
7.4.4 100.000 0.104981 +232%
7.4.3 10.000 0.014347 +195%
7.4.3 100.000 0.106236 +232%
7.4.1 100.000 0.107793 +216%
7.4.2 10.000 0.017861 +215%
7.4.2 100.000 0.112617 +229%
7.4.1 10.000 0.017339 +219%
7.4.0 10.000 0.019623 +146%
7.3.33 10.000 0.013688 +199%
7.3.31 10.000 0.016904 +194%
7.3.30 10.000 0.016636 +235%
7.3.29 10.000 0.016529 +226%
7.3.28 10.000 0.016887 +206%
7.3.27 10.000 0.021082 +218%
7.3.24 10.000 0.015616 +199%
7.3.23 10.000 0.016177 +201%
7.3.22 10.000 0.016954 +216%
7.3.19 10.000 0.016864 +197%
7.3.18 10.000 0.016995 +217%
7.3.17 10.000 0.015734 +237%
7.3.16 10.000 0.015655 +246%
7.3.15 10.000 0.017761 +293%
7.3.14 10.000 0.020074 +215%
7.3.13 10.000 0.019230 +208%
7.3.12 10.000 0.017443 +202%
7.3.11 10.000 0.017688 +152%
7.3.9 10.000 0.021365 +137%
7.3.8 10.000 0.020879 +137%
7.2.34 10.000 0.014831 100%
7.2.33 10.000 0.016013 100%
7.2.31 10.000 0.017381 100%
7.2.30 10.000 0.016265 100%
7.2.29 10.000 0.017117 100%
7.2.28 10.000 0.016496 100%
7.2.27 10.000 0.017938 100%
7.2.26 10.000 0.018557 100%
7.2.25 10.000 0.016080 100%
7.2.24 10.000 0.016835 100%
7.2.22 10.000 0.021534 100%
7.2.21 10.000 0.020416 100%
7.1.33 10.000 0.015663 100%
7.1.32 10.000 0.022499 100%
7.1.31 10.000 0.020889 100%
7.1.0 10.000 0.044992 +124%
7.0.33 10.000 0.015697 100%
7.0.7 10.000 0.042437 +122%
5.6.40 10.000 0.008220 100%
5.6.22 10.000 0.025903 100%
5.5.36 10.000 0.027150 100%
5.4.45 10.000 0.028442 100%
5.3.29 10.000 0.045968 100%

PregReplaceTest

Replace a text with preg_replace


<?php 

$text 
$this->getTextLarge();

$this->start($loop);

for (
$i 0$i $this->loop; ++$i) {
    
$value preg_replace('/Lorem ipsum/''Ipsum lorem'$text);
}

return 
$this->end();
PHP Loops Seconds Percent
8.3.13 100.000 0.070612 100%
8.3.10 100.000 0.064130 100%
8.3.9 100.000 0.068628 100%
7.3.33 100.000 0.052017 100%
7.3.31 100.000 0.052869 100%
7.3.30 100.000 0.044588 100%
7.3.29 100.000 0.046893 100%
7.3.28 100.000 0.051580 100%
7.3.27 100.000 0.059044 100%
7.3.24 100.000 0.056617 100%
7.3.23 100.000 0.061170 100%
7.3.22 100.000 0.057630 100%
7.3.19 100.000 0.057436 100%
7.3.18 100.000 0.046209 100%
7.3.17 100.000 0.050221 100%
7.3.16 100.000 0.045286 100%
7.3.15 100.000 0.044933 100%
7.3.14 100.000 0.050198 100%
7.3.13 100.000 0.053061 100%
7.3.12 100.000 0.053554 100%
7.3.11 100.000 0.102871 100%
7.3.9 100.000 0.137044 100%
7.3.8 100.000 0.140669 100%
7.2.29 100.000 0.165157 +151%
8.3.13 10.000 0.009100 100%
7.2.34 100.000 0.171472 +152%
7.2.33 100.000 0.167287 +152%
7.2.31 100.000 0.167758 +150%
7.2.30 100.000 0.165247 +150%
8.3.10 10.000 0.009107 100%
7.2.28 100.000 0.162330 +151%
7.2.27 100.000 0.168092 +152%
7.2.26 100.000 0.166392 +149%
7.2.25 100.000 0.163384 +156%
7.2.24 100.000 0.234726 +148%
7.2.22 100.000 0.290675 +141%
7.2.21 100.000 0.289329 +142%
7.1.33 100.000 0.182840 +160%
7.1.32 100.000 0.315264 +147%
7.1.31 100.000 0.305234 +147%
7.1.0 100.000 0.349555 100%
7.0.33 100.000 0.187931 +158%
7.0.7 100.000 0.335885 100%
5.6.40 100.000 0.274563 +467%
5.6.22 100.000 1.089662 +447%
5.5.36 100.000 1.102219 +424%
5.4.45 100.000 1.121887 +412%
5.3.29 100.000 1.274672 +295%
8.3.9 10.000 0.007580 100%
8.0.30 100.000 0.055109 100%
8.0.29 100.000 0.046158 100%
8.0.28 100.000 0.045611 100%
8.0.27 100.000 0.051301 100%
8.0.26 100.000 0.054638 100%
8.0.25 100.000 0.050193 100%
8.0.24 100.000 0.047014 100%
8.0.23 100.000 0.047536 100%
8.0.20 10.000 0.006166 100%
8.0.20 100.000 0.046553 100%
8.0.19 10.000 0.008595 100%
8.0.19 100.000 0.054064 100%
8.0.17 10.000 0.008634 100%
8.0.17 100.000 0.058032 100%
8.0.16 10.000 0.011148 100%
8.0.16 100.000 0.068571 100%
8.0.14 10.000 0.008998 100%
8.0.14 100.000 0.057956 100%
8.0.11 100.000 0.054228 100%
8.0.10 100.000 0.048844 100%
8.0.9 100.000 0.045572 100%
8.0.8 100.000 0.049256 100%
8.0.7 100.000 0.056049 100%
8.0.3 100.000 0.056970 100%
8.0.2 100.000 0.071386 100%
8.0.0 100.000 0.054814 100%
7.4.33 100.000 0.052443 100%
7.4.32 100.000 0.047683 100%
7.4.30 100.000 0.045047 100%
7.4.28 100.000 0.057529 100%
7.4.27 100.000 0.062887 100%
7.4.24 100.000 0.055266 100%
7.4.23 100.000 0.045465 100%
7.4.22 100.000 0.046582 100%
8.0.11 10.000 0.009321 100%
8.0.10 10.000 0.008173 100%
8.0.0 10.000 0.008699 100%
7.4.29 100.000 0.052713 100%
7.4.21 10.000 0.008068 100%
7.4.21 100.000 0.048984 100%
7.4.20 10.000 0.007408 100%
7.4.20 100.000 0.049015 100%
7.4.16 100.000 0.056812 100%
7.4.15 100.000 0.066503 100%
7.4.33 10.000 0.006417 100%
7.4.32 10.000 0.006784 100%
7.4.30 10.000 0.005946 100%
7.4.29 10.000 0.008851 100%
7.4.24 10.000 0.008466 100%
7.4.23 10.000 0.006643 100%
7.4.22 10.000 0.007488 100%
7.4.13 100.000 0.054863 100%
7.4.12 100.000 0.058247 100%
7.4.11 100.000 0.056301 100%
7.4.10 100.000 0.054767 100%
8.0.2 10.000 0.009642 100%
7.4.0 100.000 0.120482 100%
8.0.30 10.000 0.007298 100%
8.0.29 10.000 0.005665 100%
8.0.28 10.000 0.005919 100%
8.0.27 10.000 0.006470 100%
8.0.26 10.000 0.007119 100%
8.0.25 10.000 0.007300 100%
8.0.24 10.000 0.006250 100%
8.0.23 10.000 0.005532 100%
8.0.9 10.000 0.007130 100%
8.0.8 10.000 0.007405 100%
8.0.7 10.000 0.008137 100%
8.0.3 10.000 0.009215 100%
7.4.28 10.000 0.008577 100%
7.4.27 10.000 0.009435 100%
7.4.16 10.000 0.008999 100%
7.4.15 10.000 0.010519 100%
7.4.13 10.000 0.007797 100%
7.4.12 10.000 0.009060 100%
7.4.11 10.000 0.008176 100%
7.4.10 10.000 0.008184 100%
7.4.7 10.000 0.008190 100%
7.4.7 100.000 0.055126 100%
7.4.6 10.000 0.007895 100%
7.4.6 100.000 0.047550 100%
7.4.5 10.000 0.007540 100%
7.4.5 100.000 0.044396 100%
7.4.4 10.000 0.007929 100%
7.4.4 100.000 0.045157 100%
7.4.3 10.000 0.007346 100%
7.4.3 100.000 0.045834 100%
7.4.1 100.000 0.049874 100%
7.4.2 10.000 0.008304 100%
7.4.2 100.000 0.049106 100%
7.4.1 10.000 0.007922 100%
7.4.0 10.000 0.013456 100%
7.3.33 10.000 0.006862 100%
7.3.31 10.000 0.008709 100%
7.3.30 10.000 0.007094 100%
7.3.29 10.000 0.007328 100%
7.3.28 10.000 0.008214 100%
7.3.27 10.000 0.009680 100%
7.3.24 10.000 0.007859 100%
7.3.23 10.000 0.008064 100%
7.3.22 10.000 0.007858 100%
7.3.19 10.000 0.008559 100%
7.3.18 10.000 0.007822 100%
7.3.17 10.000 0.006648 100%
7.3.16 10.000 0.006365 100%
7.3.15 10.000 0.006064 100%
7.3.14 10.000 0.009343 100%
7.3.13 10.000 0.009259 100%
7.3.12 10.000 0.008621 100%
7.3.11 10.000 0.011654 100%
7.3.9 10.000 0.015574 100%
7.3.8 10.000 0.015197 100%
7.2.34 10.000 0.021336 +144%
7.2.33 10.000 0.023249 +145%
7.2.31 10.000 0.023140 +133%
7.2.30 10.000 0.023271 +143%
7.2.29 10.000 0.023647 +138%
7.2.28 10.000 0.022822 +138%
7.2.27 10.000 0.026386 +147%
7.2.26 10.000 0.024961 +135%
7.2.25 10.000 0.022983 +143%
7.2.24 10.000 0.024269 +144%
7.2.22 10.000 0.029223 +136%
7.2.21 10.000 0.028769 +141%
7.1.33 10.000 0.023120 +148%
7.1.32 10.000 0.031897 +142%
7.1.31 10.000 0.030735 +147%
7.1.0 10.000 0.036185 100%
7.0.33 10.000 0.023187 +148%
7.0.7 10.000 0.034728 100%
5.6.40 10.000 0.032042 +390%
5.6.22 10.000 0.112575 +435%
5.5.36 10.000 0.112203 +413%
5.4.45 10.000 0.114153 +401%
5.3.29 10.000 0.131122 +285%