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; }

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.01118.40
8.3.50.0030.01218.18
8.3.40.0120.00619.04
8.3.30.0040.01118.96
8.3.20.0040.00420.35
8.3.10.0040.00423.51
8.3.00.0040.00419.79
8.2.180.0140.00318.66
8.2.170.0040.01222.96
8.2.160.0070.00720.39
8.2.150.0080.00024.18
8.2.140.0000.00924.66
8.2.130.0050.00519.27
8.2.120.0070.00026.35
8.2.110.0000.00920.53
8.2.100.0040.01019.76
8.2.90.0040.00418.03
8.2.80.0080.00020.48
8.2.70.0050.00317.93
8.2.60.0000.00817.93
8.2.50.0040.00418.22
8.2.40.0030.00520.59
8.2.30.0040.00419.27
8.2.20.0040.00418.02
8.2.10.0000.00818.02
8.2.00.0030.00318.23
8.1.280.0100.00725.92
8.1.270.0030.00522.14
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.88
8.1.230.0040.00721.03
8.1.220.0050.00317.74
8.1.210.0080.00018.87
8.1.200.0060.00317.48
8.1.190.0000.00917.41
8.1.180.0050.00318.10
8.1.170.0040.00418.50
8.1.160.0040.00418.82
8.1.150.0070.00020.32
8.1.140.0040.00417.72
8.1.130.0030.00518.94
8.1.120.0040.00417.54
8.1.110.0050.00317.58
8.1.100.0090.00017.66
8.1.90.0080.00017.58
8.1.80.0070.00017.48
8.1.70.0100.00017.51
8.1.60.0040.00417.73
8.1.50.0040.00417.65
8.1.40.0000.00717.55
8.1.30.0080.00017.84
8.1.20.0040.00417.86
8.1.10.0040.00417.76
8.1.00.0030.00617.66
8.0.300.0080.00020.04
8.0.290.0000.00717.00
8.0.280.0000.00718.46
8.0.270.0000.00717.21
8.0.260.0060.00016.98
8.0.250.0000.00817.11
8.0.240.0030.00617.20
8.0.230.0060.00317.20
8.0.220.0000.00716.96
8.0.210.0030.00617.10
8.0.200.0050.00217.14
8.0.190.0030.00617.16
8.0.180.0000.00817.09
8.0.170.0080.00017.00
8.0.160.0040.00417.05
8.0.150.0070.00016.95
8.0.140.0000.00717.04
8.0.130.0050.00013.47
8.0.120.0040.00417.02
8.0.110.0030.00517.10
8.0.100.0050.00317.16
8.0.90.0040.00416.89
8.0.80.0030.01417.12
8.0.70.0000.00716.96
8.0.60.0040.00417.21
8.0.50.0080.00017.08
8.0.30.0070.01117.32
8.0.20.0110.00817.44
8.0.10.0040.00417.12
8.0.00.0090.01316.93
7.4.330.0000.00515.55
7.4.320.0000.00616.80
7.4.300.0070.00016.76
7.4.290.0050.00316.63
7.4.280.0040.00416.65
7.4.270.0040.00416.80
7.4.260.0000.00716.83
7.4.250.0030.00516.60
7.4.240.0000.00716.79
7.4.230.0070.00016.66
7.4.220.0000.00716.59
7.4.210.0090.00916.77
7.4.200.0070.00016.89
7.4.160.0110.00716.73
7.4.150.0100.00717.40
7.4.140.0050.01417.86
7.4.130.0060.01216.92
7.4.120.0120.00716.72
7.4.110.0150.00316.83
7.4.100.0100.00716.67
7.4.90.0100.00716.76
7.4.80.0120.00619.39
7.4.70.0120.00616.63
7.4.60.0090.00616.46
7.4.50.0070.01016.74
7.4.40.0130.01016.59
7.4.00.0110.00615.05
7.3.330.0030.00313.45
7.3.320.0050.00213.25
7.3.310.0000.00716.39
7.3.300.0000.00716.38
7.3.290.0080.00716.51
7.3.280.0100.00816.53
7.3.270.0090.01517.40
7.3.260.0090.01216.74
7.3.250.0150.00216.69
7.3.240.0060.01116.61
7.3.230.0080.00816.59
7.3.210.0030.01416.54
7.3.200.0090.00616.69
7.3.190.0070.01016.65
7.3.180.0110.00616.63
7.3.170.0090.00616.63
7.3.160.0130.00316.67
7.3.120.0040.01515.27
7.3.110.0030.01015.05
7.3.100.0060.00615.11
7.3.90.0000.01014.89
7.3.80.0030.01014.88
7.3.70.0100.01015.16
7.3.60.0040.01415.11
7.3.50.0110.00015.12
7.3.40.0060.00914.84
7.3.30.0100.00715.12
7.3.20.0100.01016.78
7.3.10.0030.01416.94
7.3.00.0040.00716.96
7.2.330.0070.01116.86
7.2.320.0060.01116.75
7.2.310.0140.00816.78
7.2.300.0130.00316.71
7.2.290.0080.01116.68
7.2.250.0060.01015.05
7.2.240.0120.00815.16
7.2.230.0070.01415.14
7.2.220.0070.01315.17
7.2.210.0060.00915.09
7.2.200.0060.01315.07
7.2.190.0000.01015.20
7.2.180.0000.01515.07
7.2.170.0040.01515.21
7.2.60.0100.00316.78
7.2.20.0150.01718.42
7.2.10.0190.01717.95
7.2.00.0280.00618.24
7.1.330.0080.00816.16
7.1.320.0070.00716.13
7.1.310.0090.00316.11
7.1.300.0040.01115.80
7.1.290.0100.00315.97
7.1.280.0110.00416.07
7.1.270.0040.00816.01
7.1.260.0080.00016.05
7.1.200.0070.00316.05
7.1.140.0180.01717.19
7.1.130.0220.00817.13
7.1.120.0190.00817.16
7.1.110.0210.01016.57
7.1.100.0440.01616.26
7.1.90.0200.01016.53
7.1.80.0110.01416.64
7.1.70.0110.01715.31
7.1.60.0360.01733.72
7.1.50.0410.01133.28
7.1.40.0330.01032.73
7.1.30.0310.01232.95
7.1.20.0260.01933.03
7.1.10.0130.01314.94
7.1.00.0100.01015.08

preferences:
37.35 ms | 400 KiB | 5 Q