3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(version_compare(PHP_VERSION, '5.0') <= 0) { die('Skipped'); } // Setup $class = 'Concrete5_Model_User'; $count = 10000; // Warm up for($i = 0; $i < $count; $i++) { strpos($class, 'Concrete5_Model_'); } // Test - case sensitive $t0 = microtime(true); for($i = 0; $i < $count; $i++) { if(strpos($class, 'Concrete5_Model_') === 0) { } } $deltaCS = microtime(true) - $t0; // Test - case insensitive $t0 = microtime(true); for($i = 0; $i < $count; $i++) { if(stripos($class, 'Concrete5_Model_') === 0) { } } $deltaCI = microtime(true) - $t0; // Test - substr $t0 = microtime(true); for($i = 0; $i < $count; $i++) { if(substr($class, 16) === 'Concrete5_Model_') { } } $deltaSS = microtime(true) - $t0; echo "case sensitive: ", round($deltaCS * 1000, 2), " ms\n"; echo "case insensitive: ", round($deltaCI * 1000, 2), " ms\n"; echo "case substring: ", round($deltaSS * 1000, 2), " ms\n"; echo "case sensitive gain: ", round($deltaCI * 100 / $deltaCS - 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.0100.01314.98
7.3.120.0100.01414.79
7.3.110.0040.01814.54
7.3.100.0100.01014.91
7.3.90.0030.01914.70
7.3.80.0030.01414.68
7.3.70.0060.01315.00
7.3.60.0030.01414.85
7.3.50.0110.00714.49
7.3.40.0070.01014.78
7.3.30.0000.01514.93
7.3.20.0030.01316.79
7.3.10.0080.00816.63
7.3.00.0060.01216.61
7.2.250.0100.01415.06
7.2.240.0070.01815.21
7.2.230.0100.01615.15
7.2.220.0070.01715.29
7.2.210.0000.01315.16
7.2.200.0060.01214.91
7.2.190.0000.01715.18
7.2.180.0090.00914.94
7.2.170.0110.00715.06
7.2.00.0000.01219.58
7.1.330.0040.01915.71
7.1.320.0100.01315.90
7.1.310.0030.01915.82
7.1.300.0130.00615.47
7.1.290.0080.01115.88
7.1.280.0090.01215.48
7.1.270.0100.01315.87
7.1.260.0100.01015.94
7.1.70.0000.01117.38
7.1.60.0070.02019.82
7.1.50.0100.01917.09
7.1.00.0000.04322.29
7.0.200.0000.00916.91
7.0.140.0030.08022.08
7.0.60.0070.05719.89
7.0.50.0070.04317.93
7.0.40.0030.05320.04
7.0.30.2100.05720.12
7.0.20.0230.08320.09
7.0.10.0030.09320.17
7.0.00.0070.08320.18
5.6.280.0100.08021.08
5.6.210.0070.04020.67
5.6.200.0000.09318.12
5.6.190.0030.10320.41
5.6.180.0200.05020.64
5.6.170.0230.06020.50
5.6.160.0100.08320.54
5.6.150.0100.08718.20
5.6.140.0100.06318.14
5.6.130.0070.09018.11
5.6.120.0030.08721.03
5.6.110.0000.10021.09
5.6.100.0070.08721.01
5.6.90.0170.08021.04
5.6.80.0070.04320.31
5.5.350.4300.04720.36
5.5.340.0170.08017.95
5.5.330.0030.04720.23
5.5.320.0330.08020.36
5.5.310.0200.09020.34
5.5.300.0070.04317.97
5.5.290.0000.10017.88
5.5.280.0100.09320.66
5.5.270.0030.05720.86
5.5.260.0070.07720.77
5.5.250.0030.08720.65
5.5.240.0300.07720.27
5.4.450.2470.04719.22
5.4.440.2770.04319.26
5.4.430.2530.04319.55
5.4.420.3100.04319.55
5.4.410.3130.04319.11
5.4.400.3830.04019.31
5.4.390.3170.03718.77
5.4.380.2670.05018.91
5.4.370.3230.03719.24
5.4.360.3830.04018.78
5.4.350.3230.03319.06
5.4.340.3230.04319.22
5.4.320.3100.05019.25
5.4.310.2970.05018.80
5.4.300.2270.04719.30
5.4.290.3170.04318.99
5.4.280.3130.04319.30
5.4.270.3000.04318.92
5.4.260.3000.05319.05
5.4.250.3130.04319.20
5.4.240.3170.04018.77
5.4.230.2830.05019.11
5.4.220.3100.04718.77
5.4.210.2600.04719.16
5.4.200.2700.04019.07
5.4.190.2900.04718.91
5.4.180.3170.04018.98
5.4.170.3070.04318.98
5.4.160.2770.04318.78
5.4.150.1830.04019.18
5.4.140.2970.04716.45
5.4.130.3100.03716.27
5.4.120.3570.04716.29
5.4.110.3730.04316.39
5.4.100.3500.03716.39
5.4.90.3330.04716.48
5.4.80.3230.03716.34
5.4.70.2830.04316.21
5.4.60.2900.04016.38
5.4.50.3100.05016.12
5.4.40.3200.03316.47
5.4.30.2930.04016.36
5.4.20.2530.03716.29
5.4.10.3200.04016.43
5.4.00.3200.04015.71
5.3.290.3300.04714.57
5.3.280.3370.04314.59
5.3.270.2830.04714.67
5.3.260.3030.04714.54
5.3.250.2870.04314.57
5.3.240.3100.03314.56
5.3.230.3130.03714.48
5.3.220.3130.04714.52
5.3.210.2630.06014.63
5.3.200.3130.04314.50
5.3.190.3230.04314.47
5.3.180.2730.04714.45
5.3.170.3100.04714.48
5.3.160.2930.04314.49
5.3.150.3030.04314.56
5.3.140.3100.04314.52
5.3.130.2500.04014.47
5.3.120.3230.04014.53
5.3.110.3370.05014.44
5.3.100.2670.04714.00
5.3.90.3130.04313.95
5.3.80.3130.03713.98
5.3.70.3070.05014.13
5.3.60.3030.04014.06
5.3.50.2670.04713.93
5.3.40.3170.04313.90
5.3.30.3070.05314.02
5.3.20.2730.04013.65
5.3.10.2700.04313.66
5.3.00.2730.04713.43
5.2.170.2570.03711.77
5.2.160.2700.04011.77
5.2.150.2600.03711.77
5.2.140.2430.03311.77
5.2.130.1900.04311.77
5.2.120.2300.03011.48
5.2.110.2230.03711.48
5.2.100.2030.03711.48
5.2.90.2670.04011.48
5.2.80.2730.03311.48
5.2.70.3170.04011.48
5.2.60.2330.03711.48
5.2.50.2600.03711.48
5.2.40.2270.03011.48
5.2.30.2270.03311.48
5.2.20.2730.04011.48
5.2.10.1830.03711.48
5.2.00.1930.04011.48
5.1.60.2000.03011.48
5.1.50.2000.02711.48
5.1.40.2130.03711.48
5.1.30.2400.03711.48
5.1.20.1770.03711.48
5.1.10.2000.03011.48
5.1.00.2130.04011.48
5.0.50.1330.03311.48
5.0.40.1430.03711.48
5.0.30.1500.04311.48
5.0.20.1530.03311.48
5.0.10.1470.03711.48
5.0.00.1170.04311.48
4.4.90.1430.02011.48
4.4.80.0770.02311.48
4.4.70.1300.01711.48
4.4.60.1200.01711.48
4.4.50.1330.02011.48
4.4.40.0630.02711.48
4.4.30.1430.01311.48
4.4.20.1470.01711.48
4.4.10.0770.02011.48
4.4.00.1230.02311.48
4.3.110.1130.01711.48
4.3.100.0830.01711.48
4.3.90.1130.01311.48
4.3.80.1330.03011.48
4.3.70.0700.02011.48
4.3.60.1100.01711.48
4.3.50.0870.02311.48
4.3.40.1030.02711.48
4.3.30.0630.02711.48
4.3.20.0500.01711.48
4.3.10.0530.01711.48
4.3.00.0000.03311.48

preferences:
42.18 ms | 400 KiB | 5 Q