Replace multiples strings in a text with str_replace
<?php
$text = $this->getTextLarge();
$this->start($loop);
for ($i = 0; $i < $this->loop; ++$i) {
$value = str_replace(array("\n", " "), ', ', $text);
}
return $this->end();
PHP | Loops | Seconds | Percent |
---|---|---|---|
8.3.13 | 100.000 | 1.575847 | +151% |
8.3.10 | 100.000 | 1.097741 | +105% |
8.3.9 | 100.000 | 1.043207 | 100% |
7.3.33 | 100.000 | 1.207968 | +116% |
7.3.31 | 100.000 | 1.199401 | +115% |
7.3.30 | 100.000 | 1.186258 | +114% |
7.3.29 | 100.000 | 1.208484 | +116% |
7.3.28 | 100.000 | 1.291347 | +124% |
7.3.27 | 100.000 | 1.491713 | +143% |
7.3.24 | 100.000 | 1.334680 | +128% |
7.3.23 | 100.000 | 1.223441 | +117% |
7.3.22 | 100.000 | 1.240302 | +119% |
7.3.19 | 100.000 | 1.194295 | +114% |
7.3.18 | 100.000 | 1.136458 | +109% |
7.3.17 | 100.000 | 1.181969 | +113% |
7.3.16 | 100.000 | 1.179750 | +113% |
7.3.15 | 100.000 | 1.104112 | +106% |
7.3.14 | 100.000 | 1.151808 | +110% |
7.3.13 | 100.000 | 1.100882 | +106% |
7.3.12 | 100.000 | 1.083766 | +104% |
7.3.11 | 100.000 | 1.299058 | +125% |
7.3.9 | 100.000 | 1.602926 | +154% |
7.3.8 | 100.000 | 1.479715 | +142% |
7.2.29 | 100.000 | 1.110298 | +106% |
8.3.13 | 10.000 | 0.175018 | +162% |
7.2.34 | 100.000 | 1.239634 | +119% |
7.2.33 | 100.000 | 1.190555 | +114% |
7.2.31 | 100.000 | 1.188203 | +114% |
7.2.30 | 100.000 | 1.130590 | +108% |
8.3.10 | 10.000 | 0.118038 | +109% |
7.2.28 | 100.000 | 1.157340 | +111% |
7.2.27 | 100.000 | 1.198095 | +115% |
7.2.26 | 100.000 | 1.169741 | +112% |
7.2.25 | 100.000 | 1.128928 | +108% |
7.2.24 | 100.000 | 1.300310 | +125% |
7.2.22 | 100.000 | 1.524983 | +146% |
7.2.21 | 100.000 | 1.477487 | +142% |
7.1.33 | 100.000 | 1.208002 | +116% |
7.1.32 | 100.000 | 1.540465 | +148% |
7.1.31 | 100.000 | 1.438860 | +138% |
7.1.0 | 100.000 | 2.618328 | +251% |
7.0.33 | 100.000 | 1.251971 | +120% |
7.0.7 | 100.000 | 2.589052 | +248% |
5.6.40 | 100.000 | 1.300078 | +125% |
5.6.22 | 100.000 | 2.883976 | +276% |
5.5.36 | 100.000 | 2.895495 | +278% |
5.4.45 | 100.000 | 2.974006 | +285% |
5.3.29 | 100.000 | 3.195398 | +306% |
8.3.9 | 10.000 | 0.115647 | +107% |
8.0.30 | 100.000 | 1.342324 | +129% |
8.0.29 | 100.000 | 1.071213 | +103% |
8.0.28 | 100.000 | 1.071966 | +103% |
8.0.27 | 100.000 | 1.199856 | +115% |
8.0.26 | 100.000 | 1.237124 | +119% |
8.0.25 | 100.000 | 1.188631 | +114% |
8.0.24 | 100.000 | 1.126388 | +108% |
8.0.23 | 100.000 | 1.133223 | +109% |
8.0.20 | 10.000 | 0.123013 | +114% |
8.0.20 | 100.000 | 1.154743 | +111% |
8.0.19 | 10.000 | 0.121899 | +113% |
8.0.19 | 100.000 | 1.112062 | +107% |
8.0.17 | 10.000 | 0.129727 | +120% |
8.0.17 | 100.000 | 1.193605 | +114% |
8.0.16 | 10.000 | 0.127333 | +118% |
8.0.16 | 100.000 | 1.164465 | +112% |
8.0.14 | 10.000 | 0.131321 | +122% |
8.0.14 | 100.000 | 1.227378 | +118% |
8.0.11 | 100.000 | 1.237517 | +119% |
8.0.10 | 100.000 | 1.237658 | +119% |
8.0.9 | 100.000 | 1.314160 | +126% |
8.0.8 | 100.000 | 1.505029 | +144% |
8.0.7 | 100.000 | 1.217558 | +117% |
8.0.3 | 100.000 | 1.459521 | +140% |
8.0.2 | 100.000 | 1.701467 | +163% |
8.0.0 | 100.000 | 1.304906 | +125% |
7.4.33 | 100.000 | 1.258306 | +121% |
7.4.32 | 100.000 | 1.175641 | +113% |
7.4.30 | 100.000 | 1.137093 | +109% |
7.4.28 | 100.000 | 1.157381 | +111% |
7.4.27 | 100.000 | 1.197531 | +115% |
7.4.24 | 100.000 | 1.242249 | +119% |
7.4.23 | 100.000 | 1.191049 | +114% |
7.4.22 | 100.000 | 1.221235 | +117% |
8.0.11 | 10.000 | 0.128004 | +119% |
8.0.10 | 10.000 | 0.125433 | +116% |
8.0.0 | 10.000 | 0.138758 | +128% |
7.4.29 | 100.000 | 1.138058 | +109% |
7.4.21 | 10.000 | 0.128452 | +119% |
7.4.21 | 100.000 | 1.204553 | +115% |
7.4.20 | 10.000 | 0.129465 | +120% |
7.4.20 | 100.000 | 1.193911 | +114% |
7.4.16 | 100.000 | 1.419760 | +136% |
7.4.15 | 100.000 | 1.718307 | +165% |
7.4.33 | 10.000 | 0.132120 | +122% |
7.4.32 | 10.000 | 0.128578 | +119% |
7.4.30 | 10.000 | 0.122590 | +114% |
7.4.29 | 10.000 | 0.121229 | +112% |
7.4.24 | 10.000 | 0.128377 | +119% |
7.4.23 | 10.000 | 0.129297 | +120% |
7.4.22 | 10.000 | 0.129222 | +120% |
7.4.13 | 100.000 | 1.248673 | +120% |
7.4.12 | 100.000 | 1.327936 | +127% |
7.4.11 | 100.000 | 1.245116 | +119% |
7.4.10 | 100.000 | 1.233112 | +118% |
8.0.2 | 10.000 | 0.194928 | +180% |
7.4.0 | 100.000 | 1.403544 | +135% |
8.0.30 | 10.000 | 0.144632 | +134% |
8.0.29 | 10.000 | 0.108008 | 100% |
8.0.28 | 10.000 | 0.110551 | +102% |
8.0.27 | 10.000 | 0.128279 | +119% |
8.0.26 | 10.000 | 0.129439 | +120% |
8.0.25 | 10.000 | 0.126887 | +117% |
8.0.24 | 10.000 | 0.122780 | +114% |
8.0.23 | 10.000 | 0.122621 | +114% |
8.0.9 | 10.000 | 0.139448 | +129% |
8.0.8 | 10.000 | 0.150360 | +139% |
8.0.7 | 10.000 | 0.133397 | +124% |
8.0.3 | 10.000 | 0.158406 | +147% |
7.4.28 | 10.000 | 0.123180 | +114% |
7.4.27 | 10.000 | 0.128346 | +119% |
7.4.16 | 10.000 | 0.160818 | +149% |
7.4.15 | 10.000 | 0.196297 | +182% |
7.4.13 | 10.000 | 0.132802 | +123% |
7.4.12 | 10.000 | 0.140221 | +130% |
7.4.11 | 10.000 | 0.137234 | +127% |
7.4.10 | 10.000 | 0.133299 | +123% |
7.4.7 | 10.000 | 0.133615 | +124% |
7.4.7 | 100.000 | 1.265379 | +121% |
7.4.6 | 10.000 | 0.125513 | +116% |
7.4.6 | 100.000 | 1.132693 | +109% |
7.4.5 | 10.000 | 0.118464 | +110% |
7.4.5 | 100.000 | 1.125135 | +108% |
7.4.4 | 10.000 | 0.117532 | +109% |
7.4.4 | 100.000 | 1.099092 | +105% |
7.4.3 | 10.000 | 0.125951 | +117% |
7.4.3 | 100.000 | 1.126727 | +108% |
7.4.1 | 100.000 | 1.105924 | +106% |
7.4.2 | 10.000 | 0.127555 | +118% |
7.4.2 | 100.000 | 1.162616 | +111% |
7.4.1 | 10.000 | 0.123401 | +114% |
7.4.0 | 10.000 | 0.140010 | +130% |
7.3.33 | 10.000 | 0.128334 | +119% |
7.3.31 | 10.000 | 0.129128 | +120% |
7.3.30 | 10.000 | 0.127302 | +118% |
7.3.29 | 10.000 | 0.127582 | +118% |
7.3.28 | 10.000 | 0.160981 | +149% |
7.3.27 | 10.000 | 0.165547 | +153% |
7.3.24 | 10.000 | 0.139320 | +129% |
7.3.23 | 10.000 | 0.133959 | +124% |
7.3.22 | 10.000 | 0.134599 | +125% |
7.3.19 | 10.000 | 0.129061 | +119% |
7.3.18 | 10.000 | 0.123895 | +115% |
7.3.17 | 10.000 | 0.131223 | +121% |
7.3.16 | 10.000 | 0.123395 | +114% |
7.3.15 | 10.000 | 0.116728 | +108% |
7.3.14 | 10.000 | 0.126836 | +117% |
7.3.13 | 10.000 | 0.121584 | +113% |
7.3.12 | 10.000 | 0.118738 | +110% |
7.3.11 | 10.000 | 0.134900 | +125% |
7.3.9 | 10.000 | 0.154477 | +143% |
7.3.8 | 10.000 | 0.146731 | +136% |
7.2.34 | 10.000 | 0.132915 | +123% |
7.2.33 | 10.000 | 0.127371 | +118% |
7.2.31 | 10.000 | 0.127096 | +118% |
7.2.30 | 10.000 | 0.119459 | +111% |
7.2.29 | 10.000 | 0.123188 | +114% |
7.2.28 | 10.000 | 0.119339 | +110% |
7.2.27 | 10.000 | 0.133227 | +123% |
7.2.26 | 10.000 | 0.128779 | +119% |
7.2.25 | 10.000 | 0.124604 | +115% |
7.2.24 | 10.000 | 0.133443 | +124% |
7.2.22 | 10.000 | 0.149465 | +138% |
7.2.21 | 10.000 | 0.148970 | +138% |
7.1.33 | 10.000 | 0.129184 | +120% |
7.1.32 | 10.000 | 0.155934 | +144% |
7.1.31 | 10.000 | 0.143355 | +133% |
7.1.0 | 10.000 | 0.271045 | +251% |
7.0.33 | 10.000 | 0.134298 | +124% |
7.0.7 | 10.000 | 0.262683 | +243% |
5.6.40 | 10.000 | 0.138644 | +128% |
5.6.22 | 10.000 | 0.291211 | +270% |
5.5.36 | 10.000 | 0.293838 | +272% |
5.4.45 | 10.000 | 0.298869 | +277% |
5.3.29 | 10.000 | 0.330598 | +306% |