CamelCasePregReplaceTest

Create a camelCase string using preg_replace_callback


<?php 

$this
->start($loop);

for (
$i 0$i $this->loop; ++$i) {
    
$value preg_replace_callback('/[^a-zA-Z0-9]+([a-zA-Z0-9])/', function($matches) {
        return 
ucfirst($matches[1]);
    }, 
strtolower('id_company_user_'.$i));
}

return 
$this->end();
PHP Loops Seconds Percent
8.3.13 100.000 0.189369 +195%
8.3.10 100.000 0.162350 +167%
8.3.9 100.000 0.152724 +157%
7.3.33 100.000 0.116327 +120%
7.3.31 100.000 0.107101 +110%
7.3.30 100.000 0.105450 +109%
7.3.29 100.000 0.114122 +118%
7.3.28 100.000 0.106573 +110%
7.3.27 100.000 0.135376 +139%
7.3.24 100.000 0.111159 +114%
7.3.23 100.000 0.114258 +118%
7.3.22 100.000 0.119427 +123%
7.3.19 100.000 0.114196 +118%
7.3.18 100.000 0.106557 +110%
7.3.17 100.000 0.104305 +107%
7.3.16 100.000 0.106789 +110%
7.3.15 100.000 0.102516 +106%
7.3.14 100.000 0.109212 +112%
7.3.13 100.000 0.107292 +111%
7.3.12 100.000 0.101196 +104%
7.3.11 100.000 0.122864 +127%
7.3.9 100.000 0.152998 +158%
7.3.8 100.000 0.140229 +144%
7.2.29 100.000 0.121847 +126%
8.3.13 10.000 0.021776 +188%
7.2.34 100.000 0.135396 +139%
7.2.33 100.000 0.130618 +135%
7.2.31 100.000 0.132207 +136%
7.2.30 100.000 0.120146 +124%
8.3.10 10.000 0.020440 +177%
7.2.28 100.000 0.120903 +125%
7.2.27 100.000 0.126652 +130%
7.2.26 100.000 0.124255 +128%
7.2.25 100.000 0.122117 +126%
7.2.24 100.000 0.148190 +153%
7.2.22 100.000 0.173424 +179%
7.2.21 100.000 0.174230 +179%
7.1.33 100.000 0.160424 +165%
7.1.32 100.000 0.236950 +244%
7.1.31 100.000 0.212493 +219%
7.1.0 100.000 1.226330 +1263%
7.0.33 100.000 0.165185 +170%
7.0.7 100.000 1.211477 +1248%
5.6.40 100.000 0.449093 +463%
5.6.22 100.000 2.286997 +2356%
5.5.36 100.000 2.486492 +2561%
5.4.45 100.000 2.400155 +2472%
5.3.29 100.000 2.685085 +2766%
8.3.9 10.000 0.019652 +170%
8.0.30 100.000 0.135223 +139%
8.0.29 100.000 0.106089 +109%
8.0.28 100.000 0.101829 +105%
8.0.27 100.000 0.107089 +110%
8.0.26 100.000 0.107188 +110%
8.0.25 100.000 0.110327 +114%
8.0.24 100.000 0.100135 +103%
8.0.23 100.000 0.108724 +112%
8.0.20 10.000 0.013373 +116%
8.0.20 100.000 0.101996 +105%
8.0.19 10.000 0.015510 +134%
8.0.19 100.000 0.104095 +107%
8.0.17 10.000 0.017395 +150%
8.0.17 100.000 0.126732 +131%
8.0.16 10.000 0.018119 +157%
8.0.16 100.000 0.108744 +112%
8.0.14 10.000 0.018157 +157%
8.0.14 100.000 0.129806 +134%
8.0.11 100.000 0.108621 +112%
8.0.10 100.000 0.113258 +117%
8.0.9 100.000 0.106041 +109%
8.0.8 100.000 0.108400 +112%
8.0.7 100.000 0.109796 +113%
8.0.3 100.000 0.134483 +139%
8.0.2 100.000 0.155775 +160%
8.0.0 100.000 0.106516 +110%
7.4.33 100.000 0.118927 +122%
7.4.32 100.000 0.100097 +103%
7.4.30 100.000 0.103758 +107%
7.4.28 100.000 0.117104 +121%
7.4.27 100.000 0.112714 +116%
7.4.24 100.000 0.106684 +110%
7.4.23 100.000 0.109544 +113%
7.4.22 100.000 0.104234 +107%
8.0.11 10.000 0.017149 +148%
8.0.10 10.000 0.016632 +144%
8.0.0 10.000 0.015461 +134%
7.4.29 100.000 0.102923 +106%
7.4.21 10.000 0.019791 +171%
7.4.21 100.000 0.101914 +105%
7.4.20 10.000 0.019334 +167%
7.4.20 100.000 0.109802 +113%
7.4.16 100.000 0.129775 +134%
7.4.15 100.000 0.160671 +165%
7.4.33 10.000 0.016208 +140%
7.4.32 10.000 0.015609 +135%
7.4.30 10.000 0.013333 +115%
7.4.29 10.000 0.018697 +162%
7.4.24 10.000 0.016808 +145%
7.4.23 10.000 0.018447 +159%
7.4.22 10.000 0.015100 +130%
7.4.13 100.000 0.110807 +114%
7.4.12 100.000 0.125892 +130%
7.4.11 100.000 0.114882 +118%
7.4.10 100.000 0.110877 +114%
8.0.2 10.000 0.025386 +219%
7.4.0 100.000 0.131184 +135%
8.0.30 10.000 0.017896 +155%
8.0.29 10.000 0.011799 +102%
8.0.28 10.000 0.013181 +114%
8.0.27 10.000 0.016093 +139%
8.0.26 10.000 0.014157 +122%
8.0.25 10.000 0.015039 +130%
8.0.24 10.000 0.013994 +121%
8.0.23 10.000 0.011575 100%
8.0.9 10.000 0.017537 +152%
8.0.8 10.000 0.019955 +172%
8.0.7 10.000 0.019255 +166%
8.0.3 10.000 0.020982 +181%
7.4.28 10.000 0.018869 +163%
7.4.27 10.000 0.018088 +156%
7.4.16 10.000 0.021011 +182%
7.4.15 10.000 0.025232 +218%
7.4.13 10.000 0.016748 +145%
7.4.12 10.000 0.016058 +139%
7.4.11 10.000 0.017552 +152%
7.4.10 10.000 0.015532 +134%
7.4.7 10.000 0.017165 +148%
7.4.7 100.000 0.111393 +115%
7.4.6 10.000 0.016453 +142%
7.4.6 100.000 0.101530 +105%
7.4.5 10.000 0.016392 +142%
7.4.5 100.000 0.103813 +107%
7.4.4 10.000 0.015943 +138%
7.4.4 100.000 0.097083 100%
7.4.3 10.000 0.017792 +154%
7.4.3 100.000 0.099620 +103%
7.4.1 100.000 0.103659 +107%
7.4.2 10.000 0.018850 +163%
7.4.2 100.000 0.114302 +118%
7.4.1 10.000 0.020105 +174%
7.4.0 10.000 0.015711 +136%
7.3.33 10.000 0.016233 +140%
7.3.31 10.000 0.017430 +151%
7.3.30 10.000 0.017506 +151%
7.3.29 10.000 0.017170 +148%
7.3.28 10.000 0.019012 +164%
7.3.27 10.000 0.021729 +188%
7.3.24 10.000 0.016758 +145%
7.3.23 10.000 0.017700 +153%
7.3.22 10.000 0.017456 +151%
7.3.19 10.000 0.018550 +160%
7.3.18 10.000 0.017272 +149%
7.3.17 10.000 0.020300 +175%
7.3.16 10.000 0.017963 +155%
7.3.15 10.000 0.017514 +151%
7.3.14 10.000 0.020277 +175%
7.3.13 10.000 0.020605 +178%
7.3.12 10.000 0.018679 +161%
7.3.11 10.000 0.015365 +133%
7.3.9 10.000 0.016244 +140%
7.3.8 10.000 0.015016 +130%
7.2.34 10.000 0.019247 +166%
7.2.33 10.000 0.018028 +156%
7.2.31 10.000 0.019809 +171%
7.2.30 10.000 0.021463 +185%
7.2.29 10.000 0.019596 +169%
7.2.28 10.000 0.021822 +189%
7.2.27 10.000 0.022337 +193%
7.2.26 10.000 0.022287 +193%
7.2.25 10.000 0.020001 +173%
7.2.24 10.000 0.018137 +157%
7.2.22 10.000 0.019789 +171%
7.2.21 10.000 0.019633 +170%
7.1.33 10.000 0.021460 +185%
7.1.32 10.000 0.023300 +201%
7.1.31 10.000 0.022203 +192%
7.1.0 10.000 0.125724 +1086%
7.0.33 10.000 0.021218 +183%
7.0.7 10.000 0.124086 +1072%
5.6.40 10.000 0.050762 +439%
5.6.22 10.000 0.232962 +2013%
5.5.36 10.000 0.254688 +2200%
5.4.45 10.000 0.245559 +2122%
5.3.29 10.000 0.271186 +2343%