3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = '222-333-4545'; if (strlen($values) > 0 && !preg_match('/^[1]{0,1}-[0-9]{3}-[0-9]{3}-[0-9]{3,4}$/', $values)) { $err_msg[4] = ('Phone number must be in format xxx-nnn-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.0070.00718.68
8.3.50.0120.00318.32
8.3.40.0070.01118.82
8.3.30.0070.00718.92
8.3.20.0070.00020.43
8.3.10.0030.00523.46
8.3.00.0050.00319.56
8.2.180.0100.00718.73
8.2.170.0060.00922.96
8.2.160.0100.00320.39
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00419.31
8.2.120.0050.00226.35
8.2.110.0040.00420.52
8.2.100.0110.00419.82
8.2.90.0040.00417.91
8.2.80.0000.00920.30
8.2.70.0030.00517.93
8.2.60.0000.00818.03
8.2.50.0050.00318.10
8.2.40.0050.00220.35
8.2.30.0020.00519.37
8.2.20.0000.00918.14
8.2.10.0070.00018.24
8.2.00.0000.00818.24
8.1.280.0070.00725.92
8.1.270.0050.00222.06
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0030.00623.92
8.1.230.0130.00020.96
8.1.220.0000.00717.79
8.1.210.0000.00818.82
8.1.200.0030.00617.48
8.1.190.0040.00417.43
8.1.180.0040.00418.10
8.1.170.0030.00518.67
8.1.160.0030.00518.97
8.1.150.0080.00020.35
8.1.140.0050.00217.59
8.1.130.0040.00419.04
8.1.120.0080.00017.60
8.1.110.0030.00517.61
8.1.100.0090.00017.44
8.1.90.0050.00317.61
8.1.80.0000.00817.53
8.1.70.0030.00717.57
8.1.60.0040.00417.64
8.1.50.0080.00017.57
8.1.40.0040.00417.57
8.1.30.0030.00617.81
8.1.20.0040.00417.73
8.1.10.0070.00017.74
8.1.00.0100.00017.64
8.0.300.0040.00420.09
8.0.290.0040.00416.88
8.0.280.0040.00418.51
8.0.270.0040.00417.18
8.0.260.0000.00717.01
8.0.250.0080.00017.00
8.0.240.0040.00716.97
8.0.230.0060.00317.13
8.0.220.0030.00317.03
8.0.210.0000.00816.93
8.0.200.0030.00316.96
8.0.190.0060.00316.98
8.0.180.0060.00317.09
8.0.170.0060.00317.07
8.0.160.0000.00717.05
8.0.150.0020.00517.00
8.0.140.0080.00017.01
8.0.130.0060.00213.48
8.0.120.0070.00017.00
8.0.110.0050.00217.00
8.0.100.0040.00417.04
8.0.90.0050.00216.91
8.0.80.0150.00417.06
8.0.70.0050.00217.00
8.0.60.0050.00317.08
8.0.50.0000.00817.02
8.0.30.0110.00617.25
8.0.20.0110.00817.40
8.0.10.0030.00316.98
8.0.00.0110.00916.99
7.4.330.0000.00515.55
7.4.320.0000.00616.78
7.4.300.0070.00016.86
7.4.290.0070.00016.84
7.4.280.0000.00716.77
7.4.270.0030.00316.86
7.4.260.0000.00716.71
7.4.250.0040.00416.68
7.4.240.0030.00316.62
7.4.230.0070.00016.63
7.4.220.0040.00416.91
7.4.210.0100.00516.67
7.4.200.0000.00716.88
7.4.160.0130.00516.57
7.4.150.0120.00717.40
7.4.140.0110.00917.86
7.4.130.0110.00516.72
7.4.120.0090.01016.66
7.4.110.0140.01016.67
7.4.100.0120.00616.86
7.4.90.0170.00716.58
7.4.80.0140.00719.39
7.4.70.0060.01016.93
7.4.60.0060.00916.62
7.4.50.0030.01316.55
7.4.40.0060.01116.65
7.4.00.0100.00715.40
7.3.330.0000.00613.32
7.3.320.0040.00413.24
7.3.310.0070.00016.29
7.3.300.0030.00316.31
7.3.290.0040.01116.43
7.3.280.0130.00616.46
7.3.270.0030.01417.40
7.3.260.0100.01116.55
7.3.250.0090.00916.45
7.3.240.0100.00716.52
7.3.230.0120.01216.57
7.3.210.0110.00516.64
7.3.200.0130.00316.49
7.3.190.0100.00716.67
7.3.180.0120.00316.41
7.3.170.0060.01116.69
7.3.160.0130.00316.68
7.3.10.0040.01116.93
7.3.00.0100.00416.79
7.2.330.0130.00316.81
7.2.320.0120.00916.98
7.2.310.0120.00416.76
7.2.300.0060.01316.90
7.2.290.0080.00816.94
7.2.130.0060.00616.96
7.2.120.0070.00717.16
7.2.110.0080.00617.09
7.2.100.0030.01017.00
7.2.90.0100.00617.16
7.2.80.0040.01116.86
7.2.70.0100.00417.01
7.2.60.0060.00917.01
7.2.50.0070.00417.10
7.2.40.0000.01517.13
7.2.30.0100.00717.19
7.2.20.0170.00917.75
7.2.10.0240.00517.62
7.2.00.0150.01417.69
7.1.250.0080.00415.80
7.1.200.0090.00316.02
7.1.140.0250.01517.09
7.1.130.0290.01517.24
7.1.120.0200.01416.71
7.1.110.0520.00716.13
7.1.100.0260.01416.16
7.1.90.0170.02016.79
7.1.80.0280.01216.71
7.1.70.0140.01715.66
7.1.60.0320.01333.63
7.1.50.0390.01233.18
7.1.40.0400.00732.73
7.1.30.0380.01533.05
7.1.20.0300.02333.03
7.1.10.0240.01414.89
7.1.00.0280.01115.11

preferences:
59.39 ms | 401 KiB | 5 Q