3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = '1-222-333-4545'; if (strlen($values) > 0 && !preg_match('/^[0-9]{3}-[0-9]{3,4}-[0-9]{3,4}$/', $values)) { $err_msg[4] = ('Phone number must be in format 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.60.0110.00418.31
8.3.50.0120.00318.34
8.3.40.0060.00918.96
8.3.30.0060.00918.80
8.3.20.0040.00420.34
8.3.10.0040.00423.36
8.3.00.0060.00319.80
8.2.180.0090.00618.82
8.2.170.0140.00722.96
8.2.160.0090.00420.52
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00319.08
8.2.120.0050.00226.35
8.2.110.0060.00320.35
8.2.100.0070.00719.88
8.2.90.0050.00318.03
8.2.80.0050.00320.41
8.2.70.0040.00418.16
8.2.60.0050.00318.05
8.2.50.0080.00018.16
8.2.40.0020.00520.47
8.2.30.0050.00319.33
8.2.20.0000.01018.02
8.2.10.0050.00318.16
8.2.00.0030.00318.32
8.1.280.0060.00925.92
8.1.270.0080.00022.18
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0080.00023.88
8.1.230.0120.00420.99
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.47
8.1.190.0040.00417.63
8.1.180.0040.00418.10
8.1.170.0040.00418.84
8.1.160.0000.00718.82
8.1.150.0000.00720.34
8.1.140.0030.00517.65
8.1.130.0070.00018.94
8.1.120.0040.00317.50
8.1.110.0080.00017.60
8.1.100.0080.00017.67
8.1.90.0050.00317.60
8.1.80.0040.00417.61
8.1.70.0030.00617.51
8.1.60.0040.00417.70
8.1.50.0040.00417.66
8.1.40.0000.00817.64
8.1.30.0060.00317.84
8.1.20.0000.00917.75
8.1.10.0080.00017.58
8.1.00.0040.00417.72
8.0.300.0050.00220.18
8.0.290.0040.00416.75
8.0.280.0070.00018.44
8.0.270.0000.00717.18
8.0.260.0070.00017.02
8.0.250.0000.00917.09
8.0.240.0100.00017.08
8.0.230.0080.00017.03
8.0.220.0050.00217.03
8.0.210.0030.00517.06
8.0.200.0050.00217.03
8.0.190.0080.00017.10
8.0.180.0030.00517.02
8.0.170.0030.00617.07
8.0.160.0000.00817.03
8.0.150.0070.00017.02
8.0.140.0030.00516.87
8.0.130.0060.00013.42
8.0.120.0040.00417.04
8.0.110.0000.00716.81
8.0.100.0040.00416.92
8.0.90.0000.00717.08
8.0.80.0060.00917.00
8.0.70.0000.00816.88
8.0.60.0000.00716.99
8.0.50.0000.00717.09
8.0.30.0110.00917.18
8.0.20.0120.00817.43
8.0.10.0070.00017.08
8.0.00.0120.01216.82
7.4.330.0060.00015.55
7.4.320.0000.00616.74
7.4.300.0000.00616.71
7.4.290.0030.00316.73
7.4.280.0040.00416.78
7.4.270.0000.00716.80
7.4.260.0070.00016.73
7.4.250.0090.00016.73
7.4.240.0030.00316.67
7.4.230.0030.00316.55
7.4.220.0030.00516.84
7.4.210.0050.01116.84
7.4.200.0040.00416.71
7.4.160.0100.00716.70
7.4.150.0060.01217.40
7.4.140.0110.00917.86
7.4.130.0100.00716.58
7.4.120.0060.01416.73
7.4.110.0090.00916.68
7.4.100.0060.01016.66
7.4.90.0130.00716.56
7.4.80.0060.01319.39
7.4.70.0080.00916.71
7.4.60.0110.00716.73
7.4.50.0120.00616.61
7.4.40.0060.01216.70
7.4.00.0070.00715.32
7.3.330.0000.00513.39
7.3.320.0000.00813.20
7.3.310.0030.00316.46
7.3.300.0030.00316.36
7.3.290.0110.00416.38
7.3.280.0100.00716.44
7.3.270.0060.01117.40
7.3.260.0090.01116.62
7.3.250.0150.00416.46
7.3.240.0100.00816.69
7.3.230.0080.00916.81
7.3.210.0100.00716.44
7.3.200.0100.00616.46
7.3.190.0100.00716.52
7.3.180.0120.00316.53
7.3.170.0090.00616.70
7.3.160.0030.01316.66
7.2.330.0070.01016.86
7.2.320.0070.01016.93
7.2.310.0030.01316.96
7.2.300.0040.01316.98
7.2.290.0130.00916.98
7.2.60.0030.01017.36
7.2.20.0350.00818.33
7.2.10.0250.00418.10
7.2.00.0280.01917.90
7.1.200.0060.00616.16
7.1.140.0140.01416.83
7.1.130.0180.01216.73
7.1.120.0200.01016.80
7.1.110.0330.01016.69
7.1.100.0270.01316.64
7.1.90.0280.01016.16
7.1.80.0260.01516.41
7.1.70.0200.01015.57
7.1.60.0370.01733.69
7.1.50.0440.01333.17
7.1.40.0430.01332.91
7.1.30.0260.01332.82
7.1.20.0300.00933.16
7.1.10.0000.01815.06
7.1.00.0270.01115.33

preferences:
58.37 ms | 401 KiB | 5 Q