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.4.4 | 100.000 | 0.954102 | +124% |
8.3.9 | 100.000 | 1.043207 | +136% |
7.4.1 | 100.000 | 1.105924 | +144% |
7.4.0 | 100.000 | 1.403544 | +183% |
7.3.33 | 100.000 | 1.217894 | +159% |
7.3.31 | 100.000 | 1.199401 | +156% |
7.3.30 | 100.000 | 1.186258 | +155% |
7.3.29 | 100.000 | 1.208484 | +158% |
7.3.28 | 100.000 | 1.291347 | +168% |
7.3.27 | 100.000 | 1.491713 | +194% |
7.3.24 | 100.000 | 1.334680 | +174% |
7.3.23 | 100.000 | 1.223441 | +159% |
7.3.22 | 100.000 | 1.240302 | +162% |
7.3.19 | 100.000 | 1.194295 | +156% |
7.3.18 | 100.000 | 1.136458 | +148% |
7.3.17 | 100.000 | 1.181969 | +154% |
7.3.16 | 100.000 | 1.179750 | +154% |
7.3.15 | 100.000 | 1.104112 | +144% |
7.3.14 | 100.000 | 1.151808 | +150% |
7.3.13 | 100.000 | 1.100882 | +144% |
7.3.12 | 100.000 | 1.083766 | +141% |
7.3.11 | 100.000 | 1.299058 | +169% |
7.3.9 | 100.000 | 1.602926 | +209% |
7.3.8 | 100.000 | 1.479715 | +193% |
7.2.34 | 100.000 | 1.243627 | +162% |
7.2.33 | 100.000 | 1.190555 | +155% |
7.2.31 | 100.000 | 1.188203 | +155% |
7.2.30 | 100.000 | 1.130590 | +147% |
7.2.29 | 100.000 | 1.110298 | +145% |
7.2.28 | 100.000 | 1.157340 | +151% |
7.2.27 | 100.000 | 1.198095 | +156% |
7.2.26 | 100.000 | 1.169741 | +152% |
7.2.25 | 100.000 | 1.128928 | +147% |
7.2.24 | 100.000 | 1.300310 | +170% |
7.2.22 | 100.000 | 1.524983 | +199% |
7.2.21 | 100.000 | 1.477487 | +193% |
7.1.33 | 100.000 | 1.222562 | +159% |
7.1.32 | 100.000 | 1.540465 | +201% |
7.1.31 | 100.000 | 1.438860 | +188% |
7.1.0 | 100.000 | 2.618328 | +341% |
7.0.33 | 100.000 | 1.256842 | +164% |
7.0.7 | 100.000 | 2.589052 | +337% |
5.6.40 | 100.000 | 1.308473 | +171% |
5.6.22 | 100.000 | 2.883976 | +376% |
5.5.36 | 100.000 | 2.895495 | +377% |
5.4.45 | 100.000 | 2.974006 | +388% |
5.3.29 | 100.000 | 3.195398 | +417% |
8.4.4 | 10.000 | 0.099996 | +116% |
8.3.16 | 100.000 | 0.767127 | 100% |
8.3.13 | 100.000 | 1.150820 | +150% |
8.3.10 | 10.000 | 0.118038 | +137% |
8.3.10 | 100.000 | 1.097741 | +143% |
8.0.29 | 100.000 | 1.071213 | +140% |
8.0.28 | 100.000 | 1.071966 | +140% |
8.0.27 | 100.000 | 1.199856 | +156% |
8.0.26 | 100.000 | 1.237124 | +161% |
8.0.25 | 100.000 | 1.188631 | +155% |
8.0.24 | 100.000 | 1.126388 | +147% |
8.0.23 | 100.000 | 1.133223 | +148% |
8.0.20 | 100.000 | 1.154743 | +151% |
8.3.16 | 10.000 | 0.085922 | 100% |
8.3.13 | 10.000 | 0.132206 | +154% |
8.0.19 | 100.000 | 1.112062 | +145% |
8.0.17 | 100.000 | 1.193605 | +156% |
8.0.16 | 100.000 | 1.164465 | +152% |
8.0.14 | 100.000 | 1.227378 | +160% |
8.0.11 | 100.000 | 1.237517 | +161% |
8.0.9 | 100.000 | 1.314160 | +171% |
8.0.8 | 100.000 | 1.505029 | +196% |
7.4.10 | 100.000 | 1.233112 | +161% |
8.3.9 | 10.000 | 0.115647 | +135% |
8.0.30 | 100.000 | 1.355121 | +177% |
7.4.11 | 100.000 | 1.245116 | +162% |
8.0.30 | 10.000 | 0.144891 | +169% |
8.0.29 | 10.000 | 0.108008 | +126% |
8.0.28 | 10.000 | 0.110551 | +129% |
8.0.27 | 10.000 | 0.128279 | +149% |
8.0.26 | 10.000 | 0.129439 | +151% |
8.0.25 | 10.000 | 0.126887 | +148% |
8.0.24 | 10.000 | 0.122780 | +143% |
8.0.23 | 10.000 | 0.122621 | +143% |
8.0.20 | 10.000 | 0.123013 | +143% |
8.0.19 | 10.000 | 0.121899 | +142% |
8.0.17 | 10.000 | 0.129727 | +151% |
8.0.16 | 10.000 | 0.127333 | +148% |
8.0.14 | 10.000 | 0.131321 | +153% |
8.0.11 | 10.000 | 0.128004 | +149% |
8.0.7 | 100.000 | 1.217558 | +159% |
8.0.10 | 10.000 | 0.125433 | +146% |
8.0.10 | 100.000 | 1.237658 | +161% |
8.0.3 | 100.000 | 1.459521 | +190% |
8.0.2 | 100.000 | 1.701467 | +222% |
8.0.0 | 100.000 | 1.304906 | +170% |
7.4.29 | 100.000 | 1.138058 | +148% |
8.0.0 | 10.000 | 0.138758 | +161% |
7.4.33 | 100.000 | 1.278000 | +167% |
7.4.32 | 100.000 | 1.175641 | +153% |
8.0.2 | 10.000 | 0.194928 | +227% |
7.4.33 | 10.000 | 0.133931 | +156% |
7.4.30 | 10.000 | 0.122590 | +143% |
7.4.30 | 100.000 | 1.137093 | +148% |
7.4.29 | 10.000 | 0.121229 | +141% |
7.4.28 | 10.000 | 0.123180 | +143% |
7.4.28 | 100.000 | 1.157381 | +151% |
7.4.27 | 100.000 | 1.197531 | +156% |
7.4.24 | 10.000 | 0.128377 | +149% |
7.4.24 | 100.000 | 1.242249 | +162% |
7.4.23 | 100.000 | 1.191049 | +155% |
7.4.22 | 10.000 | 0.129222 | +150% |
7.4.22 | 100.000 | 1.221235 | +159% |
7.4.21 | 100.000 | 1.204553 | +157% |
8.0.9 | 10.000 | 0.139448 | +162% |
7.4.27 | 10.000 | 0.128346 | +149% |
7.4.21 | 10.000 | 0.128452 | +149% |
7.4.20 | 10.000 | 0.129465 | +151% |
7.4.20 | 100.000 | 1.193911 | +156% |
7.4.16 | 100.000 | 1.419760 | +185% |
8.0.8 | 10.000 | 0.150360 | +175% |
8.0.7 | 10.000 | 0.133397 | +155% |
8.0.3 | 10.000 | 0.158406 | +184% |
7.4.32 | 10.000 | 0.128578 | +150% |
7.4.23 | 10.000 | 0.129297 | +150% |
7.4.16 | 10.000 | 0.160818 | +187% |
7.4.15 | 10.000 | 0.196297 | +228% |
7.4.15 | 100.000 | 1.718307 | +224% |
7.4.13 | 100.000 | 1.248673 | +163% |
7.4.13 | 10.000 | 0.132802 | +155% |
7.4.12 | 100.000 | 1.327936 | +173% |
7.4.6 | 100.000 | 1.132693 | +148% |
7.4.12 | 10.000 | 0.140221 | +163% |
7.4.11 | 10.000 | 0.137234 | +160% |
7.4.10 | 10.000 | 0.133299 | +155% |
7.4.7 | 10.000 | 0.133615 | +156% |
7.4.7 | 100.000 | 1.265379 | +165% |
7.4.6 | 10.000 | 0.125513 | +146% |
7.4.5 | 10.000 | 0.118464 | +138% |
7.4.5 | 100.000 | 1.125135 | +147% |
7.4.4 | 10.000 | 0.117532 | +137% |
7.4.4 | 100.000 | 1.099092 | +143% |
7.4.3 | 100.000 | 1.126727 | +147% |
7.4.3 | 10.000 | 0.125951 | +147% |
7.4.2 | 10.000 | 0.127555 | +148% |
7.4.2 | 100.000 | 1.162616 | +152% |
7.4.1 | 10.000 | 0.123401 | +144% |
7.4.0 | 10.000 | 0.140010 | +163% |
7.3.33 | 10.000 | 0.129337 | +151% |
7.3.31 | 10.000 | 0.129128 | +150% |
7.3.30 | 10.000 | 0.127302 | +148% |
7.3.29 | 10.000 | 0.127582 | +148% |
7.3.28 | 10.000 | 0.160981 | +187% |
7.3.27 | 10.000 | 0.165547 | +193% |
7.3.24 | 10.000 | 0.139320 | +162% |
7.3.23 | 10.000 | 0.133959 | +156% |
7.3.22 | 10.000 | 0.134599 | +157% |
7.3.19 | 10.000 | 0.129061 | +150% |
7.3.18 | 10.000 | 0.123895 | +144% |
7.3.17 | 10.000 | 0.131223 | +153% |
7.3.16 | 10.000 | 0.123395 | +144% |
7.3.15 | 10.000 | 0.116728 | +136% |
7.3.14 | 10.000 | 0.126836 | +148% |
7.3.13 | 10.000 | 0.121584 | +142% |
7.3.12 | 10.000 | 0.118738 | +138% |
7.3.11 | 10.000 | 0.134900 | +157% |
7.3.9 | 10.000 | 0.154477 | +180% |
7.3.8 | 10.000 | 0.146731 | +171% |
7.2.34 | 10.000 | 0.133321 | +155% |
7.2.33 | 10.000 | 0.127371 | +148% |
7.2.31 | 10.000 | 0.127096 | +148% |
7.2.30 | 10.000 | 0.119459 | +139% |
7.2.29 | 10.000 | 0.123188 | +143% |
7.2.28 | 10.000 | 0.119339 | +139% |
7.2.27 | 10.000 | 0.133227 | +155% |
7.2.26 | 10.000 | 0.128779 | +150% |
7.2.25 | 10.000 | 0.124604 | +145% |
7.2.24 | 10.000 | 0.133443 | +155% |
7.2.22 | 10.000 | 0.149465 | +174% |
7.2.21 | 10.000 | 0.148970 | +173% |
7.1.33 | 10.000 | 0.130412 | +152% |
7.1.32 | 10.000 | 0.155934 | +181% |
7.1.31 | 10.000 | 0.143355 | +167% |
7.1.0 | 10.000 | 0.271045 | +315% |
7.0.33 | 10.000 | 0.134923 | +157% |
7.0.7 | 10.000 | 0.262683 | +306% |
5.6.40 | 10.000 | 0.139464 | +162% |
5.6.22 | 10.000 | 0.291211 | +339% |
5.5.36 | 10.000 | 0.293838 | +342% |
5.4.45 | 10.000 | 0.298869 | +348% |
5.3.29 | 10.000 | 0.330598 | +385% |