Replace a text with preg_replace and a regular expression
<?php
$text = $this->getTextLarge();
$this->start($loop);
for ($i = 0; $i < $this->loop; ++$i) {
$value = preg_replace('/([Lorem]+) ([ipsum]+)/', '$1 $2', $text);
}
return $this->end();
PHP | Loops | Seconds | Percent |
---|---|---|---|
8.3.13 | 100.000 | 0.957595 | +147% |
8.3.10 | 100.000 | 0.896947 | +138% |
8.3.9 | 100.000 | 0.916968 | +141% |
7.3.33 | 100.000 | 0.836174 | +129% |
7.3.31 | 100.000 | 0.749577 | +115% |
7.3.30 | 100.000 | 0.828137 | +127% |
7.3.29 | 100.000 | 0.876532 | +135% |
7.3.28 | 100.000 | 0.834450 | +128% |
7.3.27 | 100.000 | 1.054409 | +162% |
7.3.24 | 100.000 | 1.013681 | +156% |
7.3.23 | 100.000 | 1.062083 | +163% |
7.3.22 | 100.000 | 1.019719 | +157% |
7.3.19 | 100.000 | 1.019392 | +157% |
7.3.18 | 100.000 | 0.833896 | +128% |
7.3.17 | 100.000 | 0.842725 | +130% |
7.3.16 | 100.000 | 0.819309 | +126% |
7.3.15 | 100.000 | 0.815662 | +125% |
7.3.14 | 100.000 | 0.844726 | +130% |
7.3.13 | 100.000 | 0.826257 | +127% |
7.3.12 | 100.000 | 0.650323 | 100% |
7.3.11 | 100.000 | 1.005817 | +155% |
7.3.9 | 100.000 | 1.338474 | +206% |
7.3.8 | 100.000 | 1.272202 | +196% |
7.2.29 | 100.000 | 0.716043 | +110% |
8.3.13 | 10.000 | 0.101849 | +139% |
7.2.34 | 100.000 | 0.793232 | +122% |
7.2.33 | 100.000 | 0.791496 | +122% |
7.2.31 | 100.000 | 0.777020 | +119% |
7.2.30 | 100.000 | 0.731342 | +112% |
8.3.10 | 10.000 | 0.096795 | +132% |
7.2.28 | 100.000 | 0.730232 | +112% |
7.2.27 | 100.000 | 0.772056 | +119% |
7.2.26 | 100.000 | 0.737645 | +113% |
7.2.25 | 100.000 | 0.690113 | +106% |
7.2.24 | 100.000 | 1.010973 | +155% |
7.2.22 | 100.000 | 1.312857 | +202% |
7.2.21 | 100.000 | 1.260714 | +194% |
7.1.33 | 100.000 | 0.811351 | +125% |
7.1.32 | 100.000 | 1.311629 | +202% |
7.1.31 | 100.000 | 1.265756 | +195% |
7.1.0 | 100.000 | 1.729309 | +266% |
7.0.33 | 100.000 | 0.835380 | +128% |
7.0.7 | 100.000 | 1.674230 | +257% |
5.6.40 | 100.000 | 11.073938 | +1703% |
5.6.22 | 100.000 | 27.086148 | +4165% |
5.5.36 | 100.000 | 26.957388 | +4145% |
5.4.45 | 100.000 | 26.036799 | +4004% |
5.3.29 | 100.000 | 26.481715 | +4072% |
8.3.9 | 10.000 | 0.104393 | +142% |
8.0.30 | 100.000 | 0.867771 | +133% |
8.0.29 | 100.000 | 0.855002 | +131% |
8.0.28 | 100.000 | 0.832974 | +128% |
8.0.27 | 100.000 | 0.881788 | +136% |
8.0.26 | 100.000 | 0.938029 | +144% |
8.0.25 | 100.000 | 0.855280 | +132% |
8.0.24 | 100.000 | 0.823236 | +127% |
8.0.23 | 100.000 | 0.852325 | +131% |
8.0.20 | 10.000 | 0.090143 | +123% |
8.0.20 | 100.000 | 0.837377 | +129% |
8.0.19 | 10.000 | 0.090433 | +123% |
8.0.19 | 100.000 | 0.843420 | +130% |
8.0.17 | 10.000 | 0.091487 | +125% |
8.0.17 | 100.000 | 0.777121 | +119% |
8.0.16 | 10.000 | 0.084526 | +115% |
8.0.16 | 100.000 | 0.786720 | +121% |
8.0.14 | 10.000 | 0.091699 | +125% |
8.0.14 | 100.000 | 0.802234 | +123% |
8.0.11 | 100.000 | 0.735365 | +113% |
8.0.10 | 100.000 | 0.828274 | +127% |
8.0.9 | 100.000 | 0.911424 | +140% |
8.0.8 | 100.000 | 0.851483 | +131% |
8.0.7 | 100.000 | 0.852822 | +131% |
8.0.3 | 100.000 | 1.048683 | +161% |
8.0.2 | 100.000 | 1.273047 | +196% |
8.0.0 | 100.000 | 1.010698 | +155% |
7.4.33 | 100.000 | 0.866412 | +133% |
7.4.32 | 100.000 | 0.829185 | +128% |
7.4.30 | 100.000 | 0.821973 | +126% |
7.4.28 | 100.000 | 0.739835 | +114% |
7.4.27 | 100.000 | 0.793759 | +122% |
7.4.24 | 100.000 | 0.737703 | +113% |
7.4.23 | 100.000 | 0.844191 | +130% |
7.4.22 | 100.000 | 0.830338 | +128% |
8.0.11 | 10.000 | 0.081213 | +111% |
8.0.10 | 10.000 | 0.091332 | +125% |
8.0.0 | 10.000 | 0.109614 | +150% |
7.4.29 | 100.000 | 0.827531 | +127% |
7.4.21 | 10.000 | 0.092538 | +126% |
7.4.21 | 100.000 | 0.868444 | +134% |
7.4.20 | 10.000 | 0.092430 | +126% |
7.4.20 | 100.000 | 0.839158 | +129% |
7.4.16 | 100.000 | 1.030747 | +158% |
7.4.15 | 100.000 | 1.298628 | +200% |
7.4.33 | 10.000 | 0.092548 | +126% |
7.4.32 | 10.000 | 0.090236 | +123% |
7.4.30 | 10.000 | 0.087426 | +119% |
7.4.29 | 10.000 | 0.093504 | +128% |
7.4.24 | 10.000 | 0.082918 | +113% |
7.4.23 | 10.000 | 0.097899 | +134% |
7.4.22 | 10.000 | 0.097357 | +133% |
7.4.13 | 100.000 | 0.991250 | +152% |
7.4.12 | 100.000 | 1.109630 | +171% |
7.4.11 | 100.000 | 1.046505 | +161% |
7.4.10 | 100.000 | 1.018361 | +157% |
8.0.2 | 10.000 | 0.132066 | +180% |
7.4.0 | 100.000 | 1.141686 | +176% |
8.0.30 | 10.000 | 0.093653 | +128% |
8.0.29 | 10.000 | 0.089110 | +122% |
8.0.28 | 10.000 | 0.089771 | +122% |
8.0.27 | 10.000 | 0.094865 | +129% |
8.0.26 | 10.000 | 0.097606 | +133% |
8.0.25 | 10.000 | 0.091948 | +125% |
8.0.24 | 10.000 | 0.088979 | +121% |
8.0.23 | 10.000 | 0.090553 | +124% |
8.0.9 | 10.000 | 0.093202 | +127% |
8.0.8 | 10.000 | 0.144933 | +198% |
8.0.7 | 10.000 | 0.094983 | +130% |
8.0.3 | 10.000 | 0.117759 | +161% |
7.4.28 | 10.000 | 0.088043 | +120% |
7.4.27 | 10.000 | 0.091804 | +125% |
7.4.16 | 10.000 | 0.117797 | +161% |
7.4.15 | 10.000 | 0.145165 | +198% |
7.4.13 | 10.000 | 0.108996 | +149% |
7.4.12 | 10.000 | 0.115913 | +158% |
7.4.11 | 10.000 | 0.111474 | +152% |
7.4.10 | 10.000 | 0.109969 | +150% |
7.4.7 | 10.000 | 0.108250 | +148% |
7.4.7 | 100.000 | 1.012284 | +156% |
7.4.6 | 10.000 | 0.089945 | +123% |
7.4.6 | 100.000 | 0.839677 | +129% |
7.4.5 | 10.000 | 0.093688 | +128% |
7.4.5 | 100.000 | 0.838424 | +129% |
7.4.4 | 10.000 | 0.094493 | +129% |
7.4.4 | 100.000 | 0.820265 | +126% |
7.4.3 | 10.000 | 0.090184 | +123% |
7.4.3 | 100.000 | 0.827587 | +127% |
7.4.1 | 100.000 | 0.813148 | +125% |
7.4.2 | 10.000 | 0.098215 | +134% |
7.4.2 | 100.000 | 0.859281 | +132% |
7.4.1 | 10.000 | 0.090743 | +124% |
7.4.0 | 10.000 | 0.115041 | +157% |
7.3.33 | 10.000 | 0.089248 | +122% |
7.3.31 | 10.000 | 0.082885 | +113% |
7.3.30 | 10.000 | 0.091584 | +125% |
7.3.29 | 10.000 | 0.095785 | +131% |
7.3.28 | 10.000 | 0.094200 | +128% |
7.3.27 | 10.000 | 0.118072 | +161% |
7.3.24 | 10.000 | 0.110094 | +150% |
7.3.23 | 10.000 | 0.121378 | +166% |
7.3.22 | 10.000 | 0.109285 | +149% |
7.3.19 | 10.000 | 0.107594 | +147% |
7.3.18 | 10.000 | 0.092048 | +126% |
7.3.17 | 10.000 | 0.090745 | +124% |
7.3.16 | 10.000 | 0.092503 | +126% |
7.3.15 | 10.000 | 0.090044 | +123% |
7.3.14 | 10.000 | 0.097417 | +133% |
7.3.13 | 10.000 | 0.092964 | +127% |
7.3.12 | 10.000 | 0.073318 | 100% |
7.3.11 | 10.000 | 0.099410 | +136% |
7.3.9 | 10.000 | 0.131564 | +179% |
7.3.8 | 10.000 | 0.126363 | +172% |
7.2.34 | 10.000 | 0.087557 | +119% |
7.2.33 | 10.000 | 0.088221 | +120% |
7.2.31 | 10.000 | 0.084857 | +116% |
7.2.30 | 10.000 | 0.082675 | +113% |
7.2.29 | 10.000 | 0.080769 | +110% |
7.2.28 | 10.000 | 0.082979 | +113% |
7.2.27 | 10.000 | 0.085346 | +116% |
7.2.26 | 10.000 | 0.085309 | +116% |
7.2.25 | 10.000 | 0.081792 | +112% |
7.2.24 | 10.000 | 0.101009 | +138% |
7.2.22 | 10.000 | 0.129586 | +177% |
7.2.21 | 10.000 | 0.128680 | +176% |
7.1.33 | 10.000 | 0.088947 | +121% |
7.1.32 | 10.000 | 0.130134 | +177% |
7.1.31 | 10.000 | 0.130260 | +178% |
7.1.0 | 10.000 | 0.179583 | +245% |
7.0.33 | 10.000 | 0.090958 | +124% |
7.0.7 | 10.000 | 0.174576 | +238% |
5.6.40 | 10.000 | 1.134564 | +1547% |
5.6.22 | 10.000 | 2.733923 | +3729% |
5.5.36 | 10.000 | 2.722356 | +3713% |
5.4.45 | 10.000 | 2.629287 | +3586% |
5.3.29 | 10.000 | 2.666860 | +3637% |