3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = '222-333-4545'; if (strlen($values) > 0 && !preg_match('/^[0-9]{1,3}-[0-9]{3}-[0-9]{3,4}-[0-9]{3,4}$/', $values)) { $err_msg[4] = ('Phone number must be in format xxx-xxx-nnnn-nnnn.'); echo $err_msg[4]; }

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.40.0040.01418.92
8.3.30.0040.01218.92
8.3.20.0000.00720.29
8.3.10.0040.00423.61
8.3.00.0060.00319.81
8.2.170.0130.00322.96
8.2.160.0120.00320.52
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00819.39
8.2.120.0070.00026.35
8.2.110.0060.00320.54
8.2.100.0140.00019.70
8.2.90.0050.00318.16
8.2.80.0000.00920.36
8.2.70.0040.00417.93
8.2.60.0080.00017.93
8.2.50.0030.00618.22
8.2.40.0040.00420.58
8.2.30.0000.00819.21
8.2.20.0080.00018.15
8.2.10.0040.00418.08
8.2.00.0000.00718.28
8.1.270.0040.00422.05
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00023.95
8.1.230.0040.00820.83
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0000.00917.60
8.1.190.0040.00417.54
8.1.180.0000.00818.10
8.1.170.0040.00418.61
8.1.160.0000.00718.87
8.1.150.0070.00020.20
8.1.140.0040.00417.73
8.1.130.0000.00719.03
8.1.120.0040.00417.48
8.1.110.0040.00417.55
8.1.100.0000.00917.53
8.1.90.0060.00317.55
8.1.80.0040.00417.68
8.1.70.0060.00317.51
8.1.60.0000.00817.68
8.1.50.0030.00517.66
8.1.40.0070.00017.64
8.1.30.0030.00617.65
8.1.20.0000.00817.70
8.1.10.0040.00417.75
8.1.00.0050.00317.65
8.0.300.0000.00720.00
8.0.290.0000.00916.88
8.0.280.0030.00318.43
8.0.270.0000.00717.14
8.0.260.0040.00416.95
8.0.250.0040.00417.11
8.0.240.0080.00017.10
8.0.230.0000.01017.11
8.0.220.0040.00416.93
8.0.210.0040.00417.01
8.0.200.0070.00016.96
8.0.190.0000.00916.94
8.0.180.0020.00517.11
8.0.170.0090.00016.98
8.0.160.0030.00517.01
8.0.150.0030.00316.95
8.0.140.0000.00717.01
8.0.130.0000.00613.46
8.0.120.0050.00216.99
8.0.110.0030.00516.95
8.0.100.0040.00416.90
8.0.90.0000.00816.85
8.0.80.0140.00617.00
8.0.70.0040.00417.01
8.0.60.0000.00716.99
8.0.50.0000.00816.94
8.0.30.0090.00817.27
8.0.20.0080.01017.43
8.0.10.0040.00417.14
8.0.00.0130.01216.86
7.4.330.0020.00215.55
7.4.320.0030.00316.63
7.4.300.0000.00616.70
7.4.290.0060.00016.70
7.4.280.0000.00816.70
7.4.270.0030.00316.85
7.4.260.0000.00716.83
7.4.250.0000.00716.55
7.4.240.0000.00716.62
7.4.230.0030.00316.55
7.4.220.0000.00816.62
7.4.210.0090.00616.79
7.4.200.0040.00416.85
7.4.160.0100.00616.73
7.4.150.0150.00317.40
7.4.140.0120.00617.86
7.4.130.0070.01016.63
7.4.120.0070.01116.68
7.4.110.0110.00716.62
7.4.100.0100.00616.80
7.4.90.0100.00716.50
7.4.80.0060.01319.39
7.4.70.0150.00616.93
7.4.60.0060.00916.76
7.4.50.0070.00816.34
7.4.40.0200.00016.45
7.4.00.0070.01014.92
7.3.330.0000.00513.24
7.3.320.0040.00413.28
7.3.310.0000.00716.34
7.3.300.0030.00316.41
7.3.290.0060.00916.47
7.3.280.0100.00616.48
7.3.270.0130.01017.40
7.3.260.0170.01716.60
7.3.250.0090.00916.75
7.3.240.0100.00916.56
7.3.230.0120.00616.75
7.3.210.0030.01316.46
7.3.200.0060.00916.77
7.3.190.0120.00916.46
7.3.180.0130.00316.37
7.3.170.0100.00716.59
7.3.160.0040.01116.85
7.3.10.0060.00616.95
7.3.00.0040.00716.84
7.2.330.0170.00016.62
7.2.320.0150.00916.92
7.2.310.0100.00716.58
7.2.300.0070.01016.77
7.2.290.0120.00516.98
7.2.130.0070.00717.21
7.2.120.0000.01416.90
7.2.110.0000.01617.05
7.2.100.0070.00416.98
7.2.90.0000.01217.04
7.2.80.0030.00817.17
7.2.70.0100.00316.86
7.2.60.0020.00817.03
7.2.50.0000.01117.20
7.2.40.0030.01316.97
7.2.30.0060.00616.96
7.2.20.0100.01017.63
7.2.10.0090.01117.71
7.2.00.0100.01517.68
7.1.250.0000.00916.07
7.1.200.0000.01015.96
7.1.140.0160.01317.21
7.1.130.0160.01217.11
7.1.120.0280.00317.35
7.1.110.1430.01016.64
7.1.100.0290.01016.47
7.1.90.0220.01616.27
7.1.80.0280.00916.03
7.1.70.0310.00615.71
7.1.60.0440.01833.72
7.1.50.0630.01533.36
7.1.40.0320.02332.88
7.1.30.0420.01633.11
7.1.20.0380.01632.72
7.1.10.0280.00714.82
7.1.00.0240.00615.14

preferences:
60.63 ms | 400 KiB | 5 Q