3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Setup function camelcaseCurrent($name) { $r1 = ucwords(str_replace(array('_', '-', '/'), ' ', $file)); $r2 = str_replace(' ', '', $r1); return $r2; } function camelcaseNew($name) { $r1 = ucwords(str_replace(array('_', '-', '/'), '', $file)); $r2 = str_replace(' ', '', $r1); return $r2; } // Warm up for($i = 0; $i < $count; $i++) { strpos($class, 'Concrete5_Model_'); } // Test - current $t0 = microtime(true); for($i = 0; $i < $count; $i++) { camelcaseCurrent('asset_library'); } $deltaCurrent = microtime(true) - $t0; // Test - new $t0 = microtime(true); for($i = 0; $i < $count; $i++) { camelcaseNew('asset_library'); } $deltaNew = microtime(true) - $t0; echo "case current: ", round($deltaCurrent * 1000, 2), " ms\n"; echo "case new: ", round($deltaNew * 1000, 2), " ms\n"; echo "new gain: ", round($deltaNew * 100 / $deltaCurrent - 100, 2), " %\n";

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.4.00.0060.01315.11
7.3.120.0030.01514.88
7.3.110.0040.01414.74
7.3.100.0050.00514.67
7.3.90.0080.00314.83
7.3.80.0070.00414.91
7.3.70.0070.00414.89
7.3.60.0070.00714.53
7.3.50.0090.00614.81
7.3.40.0040.01114.99
7.3.30.0090.00014.91
7.3.20.0060.00916.59
7.3.10.0070.00916.51
7.3.00.0060.00816.38
7.2.250.0060.01315.17
7.2.240.0100.01015.21
7.2.230.0110.00715.16
7.2.220.0000.01615.07
7.2.210.0000.01414.84
7.2.200.0040.01114.85
7.2.190.0000.01514.69
7.2.180.0000.01414.96
7.2.170.0090.00314.95
7.2.130.0060.00916.46
7.2.120.0080.00716.76
7.2.110.0080.00816.55
7.2.100.0070.01216.47
7.2.90.0070.00816.76
7.2.80.0070.01016.51
7.2.70.0120.01016.72
7.2.60.0110.00716.64
7.2.50.0090.00816.54
7.2.40.0090.00816.57
7.2.30.0090.00716.66
7.2.20.0100.00716.51
7.2.10.0130.00716.41
7.2.00.0070.01017.50
7.1.330.0060.01215.67
7.1.320.0090.00615.95
7.1.310.0000.01015.71
7.1.300.0070.00715.44
7.1.290.0080.00815.65
7.1.280.0060.00715.89
7.1.270.0000.00815.82
7.1.260.0060.00615.53
7.1.250.0040.01015.63
7.1.240.0040.00715.82
7.1.230.0000.00715.89
7.1.220.0080.00815.80
7.1.210.0000.00915.62
7.1.200.0140.00015.55
7.1.190.0060.00615.76
7.1.180.0040.01115.44
7.1.170.0000.00815.87
7.1.160.0040.00715.91
7.1.150.0040.00415.87
7.1.140.0060.00915.90
7.1.130.0080.00415.65
7.1.120.0000.01115.74
7.1.110.0030.00615.76
7.1.100.0000.00915.94
7.1.90.0040.00715.68
7.1.80.0070.00315.66
7.1.70.0050.00716.50
7.1.60.0040.01417.82
7.1.50.0070.00716.38
7.1.40.0030.00615.70
7.1.30.0030.00915.90
7.1.20.0120.00615.69
7.1.10.0060.00615.89
7.1.00.0080.04419.04
7.0.330.0100.00615.18
7.0.320.0070.00715.37
7.0.310.0070.00315.13
7.0.300.0070.00715.36
7.0.290.0030.01015.26
7.0.280.0110.00315.22
7.0.270.0000.01115.08
7.0.260.0030.00715.17
7.0.250.0030.01015.29
7.0.240.0030.00715.34
7.0.230.0030.01215.16
7.0.220.0100.00015.28
7.0.210.0070.01015.03
7.0.200.0030.00716.12
7.0.190.0060.00615.25
7.0.180.0030.01315.09
7.0.170.0100.00315.06
7.0.160.0070.00714.97
7.0.150.0000.01215.34
7.0.140.0050.03918.78
7.0.130.0090.00615.43
7.0.120.0030.00915.34
7.0.110.0000.01215.35
7.0.100.0070.00615.46
7.0.90.0090.00315.36
7.0.80.0070.00715.26
7.0.70.0070.00715.52
7.0.60.0060.04617.63
7.0.50.0070.04216.61
7.0.40.0070.04616.76
7.0.30.0300.04116.87
7.0.20.0260.03316.76
7.0.10.0030.03816.88
7.0.00.0030.04816.88
5.6.380.0040.00414.05
5.6.370.0030.00614.23
5.6.360.0030.00813.98
5.6.350.0080.00414.03
5.6.340.0040.01114.07
5.6.330.0060.00814.36
5.6.320.0030.00913.99
5.6.310.0070.00314.24
5.6.300.0040.01114.07
5.6.290.0030.01014.29
5.6.280.0000.04517.48
5.6.270.0060.00614.37
5.6.260.0000.01014.21
5.6.250.0060.00914.19
5.6.240.0070.00314.27
5.6.230.0080.00414.05
5.6.220.0100.00014.19
5.6.210.0030.03717.41
5.6.200.0080.02816.16
5.6.190.0070.04717.27
5.6.180.0130.02617.49
5.6.170.0140.02817.42
5.6.160.0100.03817.42
5.6.150.0080.04316.19
5.6.140.0050.03516.22
5.6.130.0140.02816.41
5.6.120.0080.03817.77
5.6.110.0040.05217.70
5.6.100.0050.02317.46
5.6.90.0030.03617.67
5.6.80.0050.03217.33
5.6.70.0040.01114.18
5.6.60.0060.00914.10
5.6.50.0040.00814.09
5.6.40.0040.01014.09
5.6.30.0060.00614.10
5.6.20.0080.00814.17
5.6.10.0060.00914.33
5.6.00.0040.01114.43
5.5.380.0020.00511.10
5.5.370.0030.00310.57
5.5.360.0030.00611.01
5.5.350.0050.04215.46
5.5.340.0030.02314.30
5.5.330.0030.03215.75
5.5.320.0230.04015.59
5.5.310.0160.02515.78
5.5.300.0060.04014.66
5.5.290.0050.02714.49
5.5.280.0020.02715.96
5.5.270.0070.02515.97
5.5.260.0050.02215.98
5.5.250.0090.04015.80
5.5.240.0060.02115.65
5.5.230.0100.00011.07
5.5.220.0070.00310.82
5.5.210.0060.00311.02
5.5.200.0030.00611.22
5.5.190.0030.00611.07
5.5.180.0030.00911.10
5.5.170.0000.00710.39
5.5.160.0060.00610.80
5.5.150.0040.00410.90
5.5.140.0050.00211.33
5.5.130.0030.00911.15
5.5.120.0050.00311.02
5.5.110.0090.00011.27
5.5.100.0080.00310.68
5.5.90.0000.01110.84
5.5.80.0000.00911.29
5.5.70.0000.00610.80
5.5.60.0060.00611.18
5.5.50.0070.00310.78
5.5.40.0000.00610.76
5.5.30.0060.00611.20
5.5.20.0030.00311.11
5.5.10.0000.00710.83
5.5.00.0000.01210.70
5.4.450.0650.02515.34
5.4.440.0250.02515.38
5.4.430.0400.02115.13
5.4.420.0270.02315.28
5.4.410.0200.02015.14
5.4.400.0630.02315.11
5.4.390.0290.02615.07
5.4.380.0180.03314.63
5.4.370.0210.03414.86
5.4.360.0180.03314.87
5.4.350.0230.03514.80
5.4.340.0180.03914.74
5.4.330.0060.00310.73
5.4.320.0030.02311.71
5.4.310.0060.02711.62
5.4.300.0050.02311.90
5.4.290.0070.02411.81
5.4.280.0050.01911.81
5.4.270.0040.02511.71
5.4.260.0020.03514.95
5.4.250.0100.03014.84
5.4.240.0170.02314.89
5.4.230.0100.02614.89
5.4.220.0050.04314.86
5.4.210.0060.04615.09
5.4.200.0050.04314.89
5.4.190.0100.02814.82
5.4.180.0130.03314.98
5.4.170.0090.02915.03
5.4.160.0130.02714.63
5.4.150.0070.03814.79
5.4.140.0070.02913.64
5.4.130.0150.02113.66
5.4.120.0170.02213.68
5.4.110.0070.02813.72
5.4.100.0130.03113.74
5.4.90.0100.03013.78
5.4.80.0090.02513.69
5.4.70.0050.03413.67
5.4.60.0070.03113.81
5.4.50.0090.02713.51
5.4.40.0120.02413.66
5.4.30.0050.03713.89
5.4.20.0080.03613.63
5.4.10.0120.03013.61
5.4.00.0130.02813.39
5.3.290.0060.02511.78
5.3.280.0100.03012.57
5.3.270.0070.03212.71
5.3.260.0070.02812.44
5.3.250.0060.02912.56
5.3.240.0070.02912.73
5.3.230.0030.03212.55
5.3.220.0050.02912.66
5.3.210.0080.02812.71
5.3.200.0110.03512.59
5.3.190.0050.03512.59
5.3.180.0080.03712.57
5.3.170.0030.03712.80
5.3.160.0050.03212.71
5.3.150.0060.04312.80
5.3.140.0050.04012.64
5.3.130.0060.02912.61
5.3.120.0060.03312.75
5.3.110.0050.03612.66
5.3.100.0100.02512.52
5.3.90.0070.03712.46
5.3.80.0050.03312.21
5.3.70.0080.03812.36
5.3.60.0030.03512.30
5.3.50.0060.04012.24
5.3.40.0080.03012.31
5.3.30.0060.02412.38
5.3.20.0050.02712.06
5.3.10.0060.02612.06
5.3.00.0030.03811.94
5.2.170.0050.03210.77
5.2.160.0120.02310.77
5.2.150.0020.02510.68
5.2.140.0020.02310.78
5.2.130.0000.02510.69
5.2.120.0030.02310.72
5.2.110.0080.01810.71
5.2.100.0100.01610.74
5.2.90.0030.02110.67
5.2.80.0080.02010.67
5.2.70.0030.02410.66
5.2.60.0050.02410.68
5.2.50.0020.02710.64
5.2.40.0020.02410.65
5.2.30.0080.02010.68
5.2.20.0030.03010.68
5.2.10.0050.03010.55
5.2.00.0020.02710.55
5.1.60.0030.02510.15
5.1.50.0050.02410.08
5.1.40.0100.01510.12
5.1.30.0020.02310.43
5.1.20.0040.03010.38
5.1.10.0020.02310.29
5.1.00.0050.01910.27
5.0.50.0110.0169.42
5.0.40.0050.0139.39
5.0.30.0040.0209.23
5.0.20.0050.0139.28
5.0.10.0030.0159.24
5.0.00.0030.0259.21
4.4.90.0030.0108.65
4.4.80.0020.0178.65
4.4.70.0060.0138.65
4.4.60.0000.0168.65
4.4.50.0000.0158.65
4.4.40.0030.0188.65
4.4.30.0000.0148.65
4.4.20.0020.0148.65
4.4.10.0000.0148.65
4.4.00.0020.0258.65
4.3.110.0000.0138.65
4.3.100.0020.0158.65
4.3.90.0030.0118.65
4.3.80.0070.0178.65
4.3.70.0030.0108.65
4.3.60.0050.0108.65
4.3.50.0020.0128.65
4.3.40.0010.0188.65
4.3.30.0040.0128.65
4.3.20.0020.0138.65
4.3.10.0030.0118.65
4.3.00.0120.00811.75

preferences:
40.19 ms | 401 KiB | 5 Q