3v4l.org

run code in 300+ PHP versions simultaneously
<?php $v1 = 5; $v2 = '5-4'; $class = 'Concrete5_Controller_Name'; // Let's warm up while(++$i < 100000) { if(0) {} } // Test 'else if' $i = 0; $start = microtime(true); while(++$i < 1000000) { preg_match('/^Concrete5_Model_(.*)/i', $class); preg_match('/^Concrete5_Helper_(.*)/i', $class); preg_match('/^Concrete5_Controller_Block_(.*)/i', $class); } $end = microtime(true); echo "preg_match: ".($end - $start)."\n"; unset($start, $end); // Test 'elseif' $i = 0; $start = microtime(true); while(++$i < 1000000) { stripos($class, 'Concrete5_Model_'); stripos($class, 'Concrete5_Helper_'); stripos($class, 'Concrete5_Controller_Block_'); } $end = microtime(true); echo "stripos: ".($end - $start);

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.3.10.0120.58816.62
7.3.00.0150.56916.68
7.2.130.0150.66116.83
7.2.120.0180.67916.88
7.2.110.0170.66816.96
7.2.100.0140.65416.91
7.2.90.0150.69917.22
7.2.80.0170.65817.04
7.2.70.0120.67417.00
7.2.60.0070.65716.99
7.2.50.0240.64417.13
7.2.40.0280.64517.16
7.2.30.0300.65717.08
7.2.20.0280.64017.17
7.2.10.0250.65416.98
7.2.00.0160.55117.79
7.1.250.0121.14415.73
7.1.70.0000.58117.01
7.1.60.0070.61419.17
7.1.50.0230.59535.03
7.1.00.0030.57322.38
7.0.200.0000.62417.02
7.0.140.0100.72722.21
7.0.100.0100.68019.98
7.0.90.0070.59720.14
7.0.80.0000.59019.95
7.0.70.0400.74319.97
7.0.60.0070.69019.92
7.0.50.0000.67320.34
7.0.40.0000.53020.19
7.0.30.0070.65320.13
7.0.20.0130.57020.10
7.0.10.0070.61719.99
7.0.00.0100.66020.14
5.6.280.0001.56721.14
5.6.250.0071.63720.62
5.6.240.0071.65020.64
5.6.230.0071.60720.62
5.6.220.0031.70720.64
5.6.210.0201.84320.68
5.6.200.0171.59321.06
5.6.190.1771.74321.04
5.6.180.0001.68020.92
5.6.170.0001.66021.01
5.6.160.0031.64720.94
5.6.150.0031.71021.13
5.6.140.0031.61721.04
5.6.130.0071.74020.93
5.6.120.0031.42020.95
5.6.110.0071.48020.95
5.6.100.0001.64721.11
5.6.90.0031.58720.99
5.6.80.0001.66720.42
5.6.70.0101.61020.42
5.6.60.0071.80720.46
5.6.50.0101.47320.31
5.6.40.0071.54320.53
5.6.30.0031.64020.41
5.6.20.0001.53020.29
5.6.10.0001.65020.38
5.6.00.0171.67720.29
5.5.380.0071.52320.42
5.5.370.0101.57720.39
5.5.360.0031.79320.36
5.5.350.0101.60720.37
5.5.340.0971.52020.64
5.5.330.0031.68720.84
5.5.320.0031.67320.64
5.5.310.0001.71320.79
5.5.300.0071.69320.62
5.5.290.0001.70320.82
5.5.280.0071.70320.77
5.5.270.0001.52020.82
5.5.260.0031.51320.91
5.5.250.0031.50720.50
5.5.240.0101.58720.25
5.5.230.0071.66720.17
5.5.220.0071.54320.10
5.5.210.0071.68020.16
5.5.200.0031.63019.99
5.5.190.0101.50020.12
5.5.180.0131.70020.15
5.5.160.0001.57320.23
5.5.150.0071.46020.09
5.5.140.0101.46020.25
5.5.130.0071.57320.07
5.5.120.0131.50020.12
5.5.110.0071.62720.14
5.5.100.0171.65720.10
5.5.90.0031.60019.95
5.5.80.0101.65720.07
5.5.70.0071.66020.13
5.5.60.0071.46720.08
5.5.50.0071.43319.93
5.5.40.0071.66320.08
5.5.30.0031.60320.06
5.5.20.0101.59019.89
5.5.10.0101.45720.02
5.5.00.0071.62720.00
5.4.450.0131.63019.53
5.4.440.0001.52719.37
5.4.430.0001.35719.45
5.4.420.0001.67319.30
5.4.410.0031.51719.14
5.4.400.0031.50719.07
5.4.390.0101.44018.81
5.4.380.0101.62319.12
5.4.370.0071.60719.14
5.4.360.0031.59718.98
5.4.350.0031.49719.05
5.4.340.0101.44019.03
5.4.320.0001.64019.23
5.4.310.0071.39318.97
5.4.300.0001.49018.96
5.4.290.0031.49319.22
5.4.280.0071.51718.78
5.4.270.0031.57319.14
5.4.260.0731.56718.81
5.4.250.0001.51019.09
5.4.240.0031.57318.98
5.4.230.0071.59719.05
5.4.220.0001.36318.93
5.4.210.0101.58319.14
5.4.200.2371.54019.00
5.4.190.0001.53019.11
5.4.180.0101.63019.03
5.4.170.0001.60019.13
5.4.160.0031.36719.12
5.4.150.0101.42019.04
5.4.140.0031.39716.44
5.4.130.0071.54016.31
5.4.120.0031.61316.38
5.4.110.0031.43716.43
5.4.100.0031.39716.22
5.4.90.0101.46316.46
5.4.80.0071.57716.34
5.4.70.0001.49316.40
5.4.60.0031.68016.19
5.4.50.0071.63016.41
5.4.40.0071.66316.36
5.4.30.0071.58716.38
5.4.20.0131.64316.35
5.4.10.0001.42316.20
5.4.00.0071.50315.56
5.3.290.0071.69314.65
5.3.280.0001.95714.43
5.3.270.0031.73014.48
5.3.260.0071.75014.44
5.3.250.1931.87714.44
5.3.240.0001.86714.60
5.3.230.0001.91714.59
5.3.220.0031.77314.43
5.3.210.0072.05014.56
5.3.200.0031.98714.55
5.3.190.3931.93714.55
5.3.180.0031.92714.55
5.3.170.0001.76714.41
5.3.160.2301.76714.41
5.3.150.0001.85014.42
5.3.140.0171.80014.51
5.3.130.0071.87014.49
5.3.120.0031.99314.51
5.3.110.0131.73714.54
5.3.100.0101.73313.89
5.3.90.0071.77313.92
5.3.80.0131.71713.97
5.3.70.0031.76713.96
5.3.60.0101.71013.87
5.3.50.0001.80313.94
5.3.40.0071.75013.93
5.3.30.0101.85313.84
5.3.20.0101.86013.59
5.3.10.0131.74713.63
5.3.00.0001.91013.59
5.2.170.0071.89711.08
5.2.160.0071.78311.16
5.2.150.0001.72011.14
5.2.140.0031.98010.96
5.2.130.0301.97310.89
5.2.120.0031.90311.02
5.2.110.0031.89310.89
5.2.100.0032.01010.89
5.2.90.0071.99711.06
5.2.80.0032.02311.01
5.2.70.0031.93011.05
5.2.60.1172.01011.04
5.2.50.0031.92711.05
5.2.40.0031.95710.82
5.2.30.0031.96310.99
5.2.20.0032.00710.95
5.2.10.0031.77310.75
5.2.00.0031.72310.77
5.1.60.0002.09710.41
5.1.50.0001.72010.41
5.1.40.0031.80010.41
5.1.30.0031.94310.42
5.1.20.0001.91710.41
5.1.10.0031.81310.41
5.1.00.0071.68710.41
5.0.50.0102.44710.41
5.0.40.0032.06310.41
5.0.30.0072.22710.41
5.0.20.0002.09010.41
5.0.10.0002.07010.41
5.0.00.0032.23010.41
4.4.90.0001.41710.41
4.4.80.0001.32010.41
4.4.70.0031.35710.41
4.4.60.0071.36010.41
4.4.50.0071.37710.41
4.4.40.0001.23010.41
4.4.30.0001.21710.41
4.4.20.0001.49310.41
4.4.10.0001.33710.41
4.4.00.0001.40010.41
4.3.110.0001.21310.41
4.3.100.0031.22710.41
4.3.90.0001.07710.41
4.3.80.0071.20010.41
4.3.70.0001.25010.41
4.3.60.0071.24710.41
4.3.50.0031.10310.41
4.3.40.0071.29310.41
4.3.30.0001.34310.41
4.3.20.0001.06710.41
4.3.10.0000.98310.41
4.3.00.0000.88710.41

preferences:
43.53 ms | 401 KiB | 5 Q