3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = microtime(true); for ($i = 0; $i < 1000000; $i++) { preg_match('/^label-(.+)/', 'label-en_US', $matches); } $time = microtime(true) - $time; echo 'preg_match() took ' . number_format($time, 3) . ' seconds' . "\n"; $time = microtime(true); for ($i = 0; $i < 1000000; $i++) { strpos('label', 'label-en_US'); explode('-', 'label-en_US'); } $time = microtime(true) - $time; echo 'explode() took ' . number_format($time, 3) . ' seconds' . "\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.3.10.0070.43416.95
7.3.00.0070.45616.90
7.2.130.0030.46617.30
7.2.120.0100.47817.09
7.2.110.0030.49317.24
7.2.100.0070.55316.92
7.2.90.0100.56317.22
7.2.80.0070.53117.01
7.2.70.0030.49517.13
7.2.60.0070.50816.86
7.2.50.0070.51817.06
7.2.40.0100.51217.23
7.2.30.0030.48817.00
7.2.20.0070.53317.25
7.2.10.0030.49717.01
7.2.00.0030.43218.48
7.1.250.0100.71515.91
7.1.70.0070.31417.44
7.1.60.0600.31719.21
7.1.50.0170.39035.09
7.1.00.0000.33022.44
7.0.200.0070.36517.02
7.0.140.0070.44322.21
7.0.120.0030.44022.04
7.0.100.0100.45019.95
7.0.90.0170.50019.88
7.0.80.0300.46020.01
7.0.70.0370.42020.02
7.0.60.0100.42019.99
7.0.50.0030.47720.20
7.0.40.0130.51020.19
7.0.30.0200.41719.95
7.0.20.0100.54320.05
7.0.10.0170.42020.05
7.0.00.0000.54720.17
5.6.280.0031.24720.91
5.6.250.0031.07020.47
5.6.240.0101.12020.70
5.6.230.0030.98020.75
5.6.220.0101.01720.61
5.6.210.0101.08320.67
5.6.200.0071.11721.02
5.6.190.0101.17021.13
5.6.180.0101.02720.95
5.6.170.0101.33320.93
5.6.160.0101.06320.95
5.6.150.0071.06020.99
5.6.140.0101.12021.11
5.6.130.0131.05021.00
5.6.120.0030.97020.96
5.6.110.0030.92021.10
5.6.100.0071.11721.00
5.6.90.0031.15721.03
5.6.80.0101.06020.55
5.6.70.0071.06720.40
5.6.60.0030.94720.50
5.6.50.0000.99720.48
5.6.40.0101.07020.52
5.6.30.0070.96020.39
5.6.20.0031.13720.32
5.6.10.0130.97320.39
5.6.00.0071.13320.51
5.5.380.0001.12720.35
5.5.370.0231.11020.41
5.5.360.0171.13020.38
5.5.350.0031.12320.42
5.5.340.0201.08020.91
5.5.330.0171.13020.87
5.5.320.0201.06720.61
5.5.310.0071.14320.91
5.5.300.0031.17020.91
5.5.290.0031.09320.82
5.5.280.0070.89720.82
5.5.270.0071.03720.82
5.5.260.0101.03320.88
5.5.250.0071.07320.54
5.5.240.0071.14020.19
5.5.230.0131.10720.17
5.5.220.0071.10320.23
5.5.210.0000.98320.29
5.5.200.0001.14020.08
5.5.190.0031.10320.26
5.5.180.0101.11320.18
5.5.160.0131.09020.25
5.5.150.0070.98720.25
5.5.140.0071.10320.19
5.5.130.0101.05320.09
5.5.120.0131.03320.06
5.5.110.0000.99320.18
5.5.100.0070.89720.04
5.5.90.0001.07020.14
5.5.80.0030.88720.09
5.5.70.0071.12020.07
5.5.60.0070.96320.06
5.5.50.0131.07320.08
5.5.40.0101.09720.15
5.5.30.0071.10320.07
5.5.20.0101.08720.12
5.5.10.0031.10319.97
5.5.00.0071.10020.09
5.4.450.0071.05019.38
5.4.440.0070.90719.51
5.4.430.0030.86319.16
5.4.420.0101.18319.30
5.4.410.0071.06019.16
5.4.400.0071.07318.97
5.4.390.0031.05319.07
5.4.380.0100.95019.29
5.4.370.0000.94719.07
5.4.360.0101.08319.06
5.4.350.0071.10718.96
5.4.340.0071.07718.97
5.4.320.0070.99719.16
5.4.310.0131.07319.12
5.4.300.0131.06318.84
5.4.290.0071.10019.07
5.4.280.0101.04318.96
5.4.270.0071.08719.02
5.4.260.0000.86319.19
5.4.250.0071.12019.10
5.4.240.0001.00719.00
5.4.230.0071.07019.11
5.4.220.0100.86019.11
5.4.210.0071.13719.05
5.4.200.0070.94318.96
5.4.190.0000.93719.15
5.4.180.0071.12319.10
5.4.170.0070.90319.17
5.4.160.0071.03719.14
5.4.150.0031.03718.86
5.4.140.0031.16016.26
5.4.130.0071.06016.34
5.4.120.0001.14016.17
5.4.110.0171.10316.32
5.4.100.0071.06016.43
5.4.90.0101.06016.37
5.4.80.0071.01316.39
5.4.70.0130.92016.39
5.4.60.0001.13316.25
5.4.50.0071.04016.38
5.4.40.0131.04716.45
5.4.30.0131.08316.37
5.4.20.0071.09016.25
5.4.10.0000.91016.34
5.4.00.0100.87715.70
5.3.290.0031.26314.65
5.3.280.0101.07014.58
5.3.270.0071.00314.55
5.3.260.0031.17314.55
5.3.250.0131.25714.55
5.3.240.0071.21714.61
5.3.230.0201.15714.56
5.3.220.0071.24314.64
5.3.210.0031.15714.57
5.3.200.0031.08014.52
5.3.190.0031.22314.53
5.3.180.0071.08714.62
5.3.170.0031.23014.55
5.3.160.0131.17014.61
5.3.150.0101.22314.45
5.3.140.0031.20314.53
5.3.130.0071.11314.48
5.3.120.0031.22314.62
5.3.110.0031.14314.60
5.3.100.0031.04314.00
5.3.90.0201.19014.07
5.3.80.0031.05714.07
5.3.70.0170.98314.02
5.3.60.0071.06013.96
5.3.50.0131.21013.70
5.3.40.0071.16013.88
5.3.30.0101.20313.68
5.3.20.0071.21313.68
5.3.10.0001.18313.61
5.3.00.0031.23013.63
5.2.170.0031.34711.28
5.2.160.0071.22311.32
5.2.150.0071.11711.32
5.2.140.0101.23711.31
5.2.130.0001.12711.28
5.2.120.0031.17711.28
5.2.110.0071.19311.28
5.2.100.0171.00711.28
5.2.90.0031.08711.28
5.2.80.0031.14011.28
5.2.70.0071.15011.28
5.2.60.0070.97311.28
5.2.50.0071.09011.28
5.2.40.0071.13311.28
5.2.30.0031.20311.28
5.2.20.0031.13011.28
5.2.10.0031.22711.28
5.2.00.0031.21311.28
5.1.60.0031.14711.28
5.1.50.0071.16311.28
5.1.40.0031.21011.28
5.1.30.0031.11311.28
5.1.20.0031.13011.28
5.1.10.0001.13311.28
5.1.00.1630.99711.28
5.0.50.0031.34711.28
5.0.40.0031.40711.28
5.0.30.0001.18311.28
5.0.20.0001.18311.28
5.0.10.0031.39311.28
5.0.00.0031.32711.28
4.4.90.0071.20011.28
4.4.80.0031.26711.28
4.4.70.0031.25711.28
4.4.60.0001.39311.28
4.4.50.1031.14711.28
4.4.40.0001.21011.28
4.4.30.0031.24011.28
4.4.20.0001.34311.28
4.4.10.0071.42711.28
4.4.00.0001.21711.28
4.3.110.0031.15011.28
4.3.100.0031.12311.28
4.3.90.0031.18711.28
4.3.80.0031.35711.28
4.3.70.0001.31311.28
4.3.60.0071.26711.28
4.3.50.0031.37311.28
4.3.40.0071.29711.28
4.3.30.0001.16311.28
4.3.20.0031.21711.28
4.3.10.0001.19311.28
4.3.00.0001.05311.28

preferences:
47.2 ms | 401 KiB | 5 Q