3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = '123456-1234567890'; if (! preg_match('/((\d{0,6})-)?(\d{1,10})/', $value, $matches)) { echo 'nope'; } print_r($matches); if (!$matches[1]) { echo 'test'; }

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)
8.3.60.0130.00718.56
8.3.50.0110.00418.31
8.3.40.0070.00718.92
8.3.30.0150.00318.82
8.3.20.0040.00419.20
8.3.10.0000.00819.44
8.3.00.0040.00423.57
8.2.180.0090.00618.79
8.2.170.0150.00022.96
8.2.160.0100.00322.38
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0000.00919.95
8.2.120.0000.00726.35
8.2.110.0030.00620.47
8.2.100.0040.00817.97
8.2.90.0040.00418.34
8.2.80.0080.00019.16
8.2.70.0080.00017.77
8.2.60.0040.00417.93
8.2.50.0050.00318.10
8.2.40.0000.00719.46
8.2.30.0040.00419.51
8.2.20.0050.00218.20
8.2.10.0040.00418.09
8.2.00.0070.00019.34
8.1.280.0150.00625.92
8.1.270.0070.00023.98
8.1.260.0060.00326.35
8.1.250.0050.00328.09
8.1.240.0050.00520.91
8.1.230.0110.00020.75
8.1.220.0030.00517.76
8.1.210.0030.00518.82
8.1.200.0040.00417.47
8.1.190.0000.00817.38
8.1.180.0000.00818.10
8.1.170.0030.00618.78
8.1.160.0040.00418.83
8.1.150.0040.00418.96
8.1.140.0030.00617.68
8.1.130.0040.00419.03
8.1.120.0000.00717.66
8.1.110.0000.00917.66
8.1.100.0080.00017.66
8.1.90.0050.00217.54
8.1.80.0050.00217.57
8.1.70.0030.00317.63
8.1.60.0030.00517.68
8.1.50.0040.00417.74
8.1.40.0030.00617.54
8.1.30.0060.00317.79
8.1.20.0000.00817.70
8.1.10.0060.00317.60
8.1.00.0040.00417.64
8.0.300.0040.00420.12
8.0.290.0000.00816.88
8.0.280.0000.00718.48
8.0.270.0030.00317.33
8.0.260.0050.00217.20
8.0.250.0040.00417.12
8.0.240.0030.00517.00
8.0.230.0000.00717.09
8.0.220.0040.00417.01
8.0.210.0030.00317.04
8.0.200.0050.00316.99
8.0.190.0040.00416.99
8.0.180.0000.00717.06
8.0.170.0030.00617.07
8.0.160.0080.00016.96
8.0.150.0040.00416.98
8.0.140.0040.00416.91
8.0.130.0030.00313.43
8.0.120.0050.00216.90
8.0.110.0030.00617.07
8.0.100.0040.00416.82
8.0.90.0040.00417.10
8.0.80.0100.00716.99
8.0.70.0030.00516.94
8.0.60.0020.00517.08
8.0.50.0040.00416.95
8.0.30.0100.00817.34
8.0.20.0110.01317.40
8.0.10.0000.00717.10
8.0.00.0170.01416.97
7.4.330.0000.00615.55
7.4.320.0070.00016.65
7.4.300.0030.00316.77
7.4.290.0040.00416.73
7.4.280.0040.00416.70
7.4.270.0000.00716.73
7.4.260.0030.00316.70
7.4.250.0080.00016.69
7.4.240.0070.00016.67
7.4.230.0030.00316.80
7.4.220.0000.00716.82
7.4.210.0050.01116.74
7.4.200.0050.00216.86
7.4.160.0070.00816.73
7.4.140.0120.00917.86
7.4.130.0070.01116.58
7.4.120.0090.01316.66
7.4.110.0030.01316.86
7.4.100.0070.01016.79
7.4.90.0090.01016.49
7.4.80.0160.01119.39
7.4.70.0140.00316.75
7.4.60.0160.00616.63
7.4.50.0070.01016.54
7.4.40.0120.01116.60
7.4.00.0030.01215.04
7.3.330.0030.00313.19
7.3.320.0030.00313.20
7.3.310.0030.00316.24
7.3.300.0000.00616.35
7.3.290.0040.00416.21
7.3.280.0080.00816.34
7.3.260.0120.00716.69
7.3.240.0080.01116.73
7.3.230.0050.01416.40
7.3.210.0160.00616.62
7.3.200.0000.01616.33
7.3.190.0130.00916.39
7.3.180.0090.00616.58
7.3.170.0100.01016.64
7.3.160.0090.00916.68
7.2.330.0070.01016.75
7.2.320.0070.01016.65
7.2.310.0030.01516.54
7.2.300.0170.00016.83
7.2.290.0070.01116.80
7.2.110.0090.00616.54
7.2.60.1900.00914.88
7.2.50.1570.00815.12
7.2.40.1620.00715.56
7.2.30.1650.01215.59
7.2.20.1910.01115.62
7.2.10.1910.01015.65
7.2.00.1660.01015.52
7.1.200.0050.00515.77
7.1.170.1460.00614.01
7.1.160.0940.01417.02
7.1.150.0610.01117.19
7.1.140.1930.01217.25
7.1.130.1510.00917.10
7.1.120.1890.01217.15
7.1.110.0500.01216.52
7.1.100.0630.01116.59
7.1.90.0530.01016.51
7.1.80.1770.01016.61
7.1.70.1970.01115.44
7.1.60.0820.01633.49
7.1.50.1540.01933.17
7.1.40.0880.01732.81
7.1.30.1670.01632.83
7.1.20.2190.01232.90
7.1.10.1970.01014.94
7.1.00.0850.01015.08

preferences:
58.1 ms | 401 KiB | 5 Q