3v4l.org

run code in 300+ PHP versions simultaneously
<?php define ('BENCHMARK_ITERATIONS', 1000); $r = microtime(1); for ($i = 0; $i < BENCHMARK_ITERATIONS; $i++) { preg_match('/([0-9]+)USD(.+)/', 'DATA-THAT-SHOULD-BE-REMOVED-@##($(@# 89USD', $matches); } var_dump(microtime(1) - $r); $r = microtime(1); for ($i = 0; $i < BENCHMARK_ITERATIONS; $i++) { substr('DATA-THAT-SHOULD-BE-REMOVED-@##($(@# 89USD', 36); } var_dump(microtime(1) - $r);

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.2.00.0000.01319.25
7.1.70.0030.00617.51
7.1.60.0130.01319.70
7.1.50.0030.01716.98
7.1.00.0070.07322.39
7.0.200.1780.01014.79
7.0.140.0070.07322.08
7.0.60.0230.03721.73
7.0.50.0000.04317.91
7.0.40.0100.04020.25
7.0.30.0230.08020.11
7.0.20.0330.06320.03
7.0.10.0100.06320.13
7.0.00.0030.09020.10
5.6.280.0070.07321.02
5.6.210.0170.07320.66
5.6.200.0100.07318.22
5.6.190.0070.07320.49
5.6.180.0300.07020.46
5.6.170.0430.07720.51
5.6.160.0070.09320.44
5.6.150.0130.04718.18
5.6.140.0100.08018.20
5.6.130.0130.07018.21
5.6.120.0130.08021.05
5.6.110.0070.04721.00
5.6.100.0100.03720.97
5.6.90.0230.08021.03
5.6.80.0100.08020.44
5.5.350.0270.04320.38
5.5.340.0030.04318.00
5.5.330.0100.05020.57
5.5.320.0230.04720.18
5.5.310.0270.05320.28
5.5.300.0070.08017.91
5.5.290.0000.04717.98
5.5.280.0000.07020.87
5.5.270.0100.08320.65
5.5.260.0030.04720.96
5.5.250.0130.06320.57
5.5.240.0330.06720.11
5.4.450.4970.04319.48
5.4.440.0030.09019.25
5.4.430.1670.04319.49
5.4.420.4930.04319.52
5.4.410.4670.03719.39
5.4.400.3530.04318.89
5.4.390.4130.04019.20
5.4.380.4400.04019.17
5.4.370.3900.04319.16
5.4.360.4500.04019.26
5.4.350.1870.04019.16
5.4.340.0170.07018.93
5.4.320.2030.03319.00
5.4.310.1970.04719.04
5.4.300.3330.03719.12
5.4.290.3470.04018.97
5.4.280.2600.04019.15
5.4.270.3500.03718.88
5.4.260.3670.03318.92
5.4.250.3230.03318.86
5.4.240.0070.03318.88
5.4.230.0030.06318.99
5.4.220.5230.04319.03
5.4.210.4930.05319.25
5.4.200.3930.03319.03
5.4.190.4470.04018.88
5.4.180.3730.04318.87
5.4.170.5000.04019.03
5.4.160.4970.03718.90
5.4.150.4670.04018.90
5.4.140.4870.04716.45
5.4.130.4300.03316.25
5.4.120.4700.02716.31
5.4.110.4130.04016.31
5.4.100.5030.04016.38
5.4.90.3970.03016.57
5.4.80.4200.04016.34
5.4.70.4670.03316.48
5.4.60.6170.02316.11
5.4.50.4130.03316.54
5.4.40.3630.04016.23
5.4.30.4400.04316.36
5.4.20.4100.04016.43
5.4.10.4670.03316.46
5.4.00.5030.02715.64
5.3.290.1970.03714.67
5.3.280.4230.03714.47
5.3.270.4730.04014.58
5.3.260.4900.04314.57
5.3.250.4200.03714.48
5.3.240.4100.04314.54
5.3.230.4130.04014.56
5.3.220.4530.04014.45
5.3.210.4900.04314.49
5.3.200.4830.04014.49
5.3.190.3670.04014.49
5.3.180.4730.04014.37
5.3.170.3870.03714.48
5.3.160.4800.04314.52
5.3.150.4670.03714.38
5.3.140.4070.03314.37
5.3.130.4500.04314.44
5.3.120.3870.04314.48
5.3.110.4430.04314.47
5.3.100.5000.04313.85
5.3.90.4100.04014.04
5.3.80.4970.03713.94
5.3.70.3870.03713.94
5.3.60.4770.04013.94
5.3.50.4300.04713.91
5.3.40.4200.04313.89
5.3.30.3830.03313.92
5.3.20.5000.03713.63
5.3.10.4600.04013.60
5.3.00.4600.04013.57
5.2.170.3570.04011.13
5.2.160.3200.03311.15
5.2.150.3800.03311.15
5.2.140.3800.03311.22
5.2.130.4170.03310.98
5.2.120.4100.03711.09
5.2.110.3500.02711.03
5.2.100.3930.02711.04
5.2.90.3700.04311.00
5.2.80.4300.02310.95
5.2.70.3970.02711.03
5.2.60.4130.03310.87
5.2.50.4200.03010.83
5.2.40.3470.03010.99
5.2.30.3170.03710.90
5.2.20.3130.03310.91
5.2.10.3400.03010.90
5.2.00.3070.03310.66
5.1.60.3430.02310.10
5.1.50.3170.02310.02
5.1.40.3200.02710.08
5.1.30.3800.02710.43
5.1.20.3400.02710.50
5.1.10.3300.02710.04
5.1.00.2900.02710.19
5.0.50.0830.0278.65
5.0.40.0730.0238.39
5.0.30.1200.0338.17
5.0.20.0930.0138.10
5.0.10.0870.0208.21
5.0.00.1330.0308.27
4.4.90.1930.0178.06
4.4.80.1570.0178.06
4.4.70.1630.0138.06
4.4.60.1630.0178.06
4.4.50.1870.0178.06
4.4.40.1830.0308.06
4.4.30.1800.0138.06
4.4.20.1600.0208.06
4.4.10.0700.0208.06
4.4.00.0830.0308.06
4.3.110.0930.0208.06
4.3.100.0600.0178.06
4.3.90.0870.0138.06
4.3.80.1470.0308.06
4.3.70.1270.0208.06
4.3.60.1270.0178.06
4.3.50.1300.0138.06
4.3.40.1270.0238.06
4.3.30.0670.0208.06
4.3.20.0770.0238.06
4.3.10.0670.0238.06
4.3.00.0700.0178.06

preferences:
33.11 ms | 400 KiB | 5 Q