3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = '222'; 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.70.0070.00716.75
8.3.60.0150.00418.52
8.3.50.0070.01118.14
8.3.40.0130.00619.15
8.3.30.0090.00618.92
8.3.20.0000.00720.29
8.3.10.0070.00023.45
8.3.00.0040.00419.79
8.2.180.0120.00318.80
8.2.170.0070.00722.96
8.2.160.0070.01020.35
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00419.40
8.2.120.0080.00026.35
8.2.110.0060.00320.57
8.2.100.0080.00419.70
8.2.90.0000.00818.04
8.2.80.0030.00620.34
8.2.70.0030.00617.93
8.2.60.0000.00817.92
8.2.50.0050.00318.28
8.2.40.0050.00220.46
8.2.30.0030.00619.27
8.2.20.0060.00318.06
8.2.10.0000.00818.20
8.2.00.0040.00418.34
8.1.280.0040.01125.92
8.1.270.0040.00421.94
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0080.00023.82
8.1.230.0040.00720.89
8.1.220.0000.00717.74
8.1.210.0060.00318.77
8.1.200.0000.01017.48
8.1.190.0030.00617.54
8.1.180.0040.00418.10
8.1.170.0000.00818.73
8.1.160.0000.00718.87
8.1.150.0030.00320.16
8.1.140.0000.00717.66
8.1.130.0030.00319.03
8.1.120.0040.00417.62
8.1.110.0000.00717.64
8.1.100.0000.00817.56
8.1.90.0080.00017.49
8.1.80.0030.00317.63
8.1.70.0030.00617.58
8.1.60.0080.00017.71
8.1.50.0060.00317.67
8.1.40.0000.00817.59
8.1.30.0030.00517.80
8.1.20.0000.00817.84
8.1.10.0040.00417.75
8.1.00.0030.00617.64
8.0.300.0050.00420.05
8.0.290.0030.00616.88
8.0.280.0030.00318.35
8.0.270.0000.00717.14
8.0.260.0000.00716.99
8.0.250.0040.00417.09
8.0.240.0050.00517.11
8.0.230.0040.00417.10
8.0.220.0040.00416.90
8.0.210.0040.00416.93
8.0.200.0040.00417.01
8.0.190.0000.00817.09
8.0.180.0040.00417.07
8.0.170.0040.00417.12
8.0.160.0030.00516.95
8.0.150.0040.00416.99
8.0.140.0080.00017.00
8.0.130.0090.00013.44
8.0.120.0040.00417.00
8.0.110.0040.00417.00
8.0.100.0070.00017.02
8.0.90.0000.00716.87
8.0.80.0130.00317.10
8.0.70.0040.00416.92
8.0.60.0070.00016.92
8.0.50.0030.00516.88
8.0.30.0130.00817.29
8.0.20.0090.01117.43
8.0.10.0000.00717.04
8.0.00.0160.00416.97
7.4.330.0000.00615.55
7.4.320.0030.00316.70
7.4.300.0000.00716.79
7.4.290.0080.00016.60
7.4.280.0040.00416.64
7.4.270.0070.00016.81
7.4.260.0030.00316.59
7.4.250.0040.00416.68
7.4.240.0030.00316.72
7.4.230.0030.00316.83
7.4.220.0040.00416.79
7.4.210.0080.00716.64
7.4.200.0000.00716.78
7.4.160.0100.00716.71
7.4.150.0110.00717.40
7.4.140.0110.00717.86
7.4.130.0070.01016.65
7.4.120.0100.00916.65
7.4.110.0090.00916.79
7.4.100.0190.00016.53
7.4.90.0060.01116.52
7.4.80.0100.00919.39
7.4.70.0030.01416.70
7.4.60.0130.00616.66
7.4.50.0110.00316.68
7.4.40.0000.01716.63
7.4.00.0060.01015.31
7.3.330.0000.00513.20
7.3.320.0000.00813.24
7.3.310.0040.00416.30
7.3.300.0000.00616.32
7.3.290.0040.01116.46
7.3.280.0090.00916.37
7.3.270.0110.00817.40
7.3.260.0120.00716.41
7.3.250.0130.00316.69
7.3.240.0110.00816.62
7.3.230.0100.01016.71
7.3.210.0060.01116.68
7.3.200.0100.00616.49
7.3.190.0040.01116.76
7.3.180.0060.00916.49
7.3.170.0000.01516.51
7.3.160.0110.00716.86
7.3.10.0020.01216.86
7.3.00.0070.00516.89
7.2.330.0040.01316.96
7.2.320.0090.01316.77
7.2.310.0130.00316.82
7.2.300.0100.01016.92
7.2.290.0050.01216.78
7.2.130.0060.00817.01
7.2.120.0050.01017.10
7.2.110.0020.01217.00
7.2.100.0090.00217.08
7.2.90.0110.00517.08
7.2.80.0070.00917.15
7.2.70.0050.00816.95
7.2.60.0100.00417.08
7.2.50.0050.01017.11
7.2.40.0070.00517.11
7.2.30.0060.00717.01
7.2.20.0080.01217.50
7.2.10.0060.01217.46
7.2.00.0110.01017.68
7.1.250.0060.00615.92
7.1.200.0100.00316.01
7.1.140.0220.00617.22
7.1.130.0140.01117.07
7.1.120.0110.01817.03
7.1.110.0270.00416.60
7.1.100.0180.01416.54
7.1.90.0300.00316.18
7.1.80.0180.01316.12
7.1.70.0190.01515.65
7.1.60.0330.01633.43
7.1.50.0430.01033.39
7.1.40.0330.01832.74
7.1.30.0500.01332.90
7.1.20.0450.01032.92
7.1.10.0330.00414.83
7.1.00.0190.01615.33

preferences:
61.32 ms | 400 KiB | 5 Q