3v4l.org

run code in 300+ PHP versions simultaneously
<?php $phone_number = '+380936109511'; //$phone_number = '0936109511'; //$phone_number = 'wtf'; if ( ! preg_match('/\s\d{12}/', $phone_number) && ! preg_match('/\d{10}/', $phone_number)) { throw new Exception('Not valid phone number format'); }

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.43
8.3.50.0120.01221.14
8.3.40.0150.00018.65
8.3.30.0100.00320.29
8.3.20.0040.00420.34
8.3.10.0070.00321.17
8.3.00.0080.00022.24
8.2.180.0170.00316.75
8.2.170.0090.00622.96
8.2.160.0030.01020.57
8.2.150.0000.00924.18
8.2.140.0000.00724.66
8.2.130.0070.00026.16
8.2.120.0080.00020.75
8.2.110.0030.00619.31
8.2.100.0090.00317.72
8.2.90.0040.00419.21
8.2.80.0080.00017.97
8.2.70.0000.00817.75
8.2.60.0030.00518.03
8.2.50.0040.00418.07
8.2.40.0000.00718.34
8.2.30.0040.00419.51
8.2.20.0060.00317.85
8.2.10.0080.00017.77
8.2.00.0040.00417.69
8.1.280.0090.00625.92
8.1.270.0050.00323.99
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0060.00322.46
8.1.230.0070.00420.90
8.1.220.0000.00818.77
8.1.210.0050.00320.87
8.1.200.0000.01017.48
8.1.190.0000.00817.40
8.1.180.0050.00318.10
8.1.170.0040.00418.65
8.1.160.0040.00418.91
8.1.150.0000.00818.70
8.1.140.0040.00417.59
8.1.130.0030.00317.83
8.1.120.0000.00817.53
8.1.110.0090.00017.55
8.1.100.0040.00417.60
8.1.90.0000.00717.47
8.1.80.0040.00417.57
8.1.70.0000.00717.58
8.1.60.0040.00417.67
8.1.50.0040.00417.67
8.1.40.0080.00017.68
8.1.30.0000.00717.77
8.1.20.0050.00317.79
8.1.10.0030.00617.53
8.1.00.0000.00817.39
8.0.300.0050.00319.98
8.0.290.0000.00717.05
8.0.280.0030.00318.47
8.0.270.0000.00717.31
8.0.260.0000.00716.97
8.0.250.0000.00717.01
8.0.240.0000.00717.11
8.0.230.0040.00416.97
8.0.220.0060.00017.05
8.0.210.0030.00317.05
8.0.200.0030.00317.00
8.0.190.0000.00817.07
8.0.180.0000.00717.08
8.0.170.0030.00317.07
8.0.160.0030.00317.04
8.0.150.0070.00016.90
8.0.140.0040.00817.00
8.0.130.0050.00013.47
8.0.120.0050.00316.96
8.0.110.0020.00516.95
8.0.100.0040.00417.09
8.0.90.0030.00317.08
8.0.80.0040.01117.08
8.0.70.0070.00016.90
8.0.60.0040.00417.02
8.0.50.0070.00017.10
8.0.30.0140.00717.17
8.0.20.0190.00717.40
8.0.10.0050.00317.19
8.0.00.0110.00816.96
7.4.330.0030.00316.79
7.4.320.0000.00616.62
7.4.300.0030.00616.69
7.4.290.0030.00316.66
7.4.280.0030.00316.70
7.4.270.0030.00316.71
7.4.260.0030.00313.51
7.4.250.0000.00716.80
7.4.240.0040.00316.71
7.4.230.0030.00316.85
7.4.220.0090.01016.79
7.4.210.0080.00816.74
7.4.200.0030.00316.71
7.4.190.0030.00316.96
7.4.160.0110.00416.52
7.4.150.0170.00017.40
7.4.140.0070.01117.86
7.4.130.0100.00816.69
7.4.120.0110.00616.72
7.4.110.0130.00316.73
7.4.100.0120.00916.54
7.4.90.0060.01216.80
7.4.80.0070.01019.39
7.4.70.0060.01016.84
7.4.60.0110.00616.73
7.4.50.0000.00616.67
7.4.40.0030.01022.77
7.4.30.0040.01216.68
7.4.00.0080.00615.20
7.3.330.0000.00513.12
7.3.320.0060.00013.26
7.3.310.0000.00716.15
7.3.300.0030.00316.26
7.3.290.0130.00016.35
7.3.280.0070.01116.28
7.3.270.0160.00717.40
7.3.260.0120.00618.24
7.3.250.0070.01116.45
7.3.240.0030.01616.44
7.3.230.0130.00516.48
7.3.210.0030.01316.76
7.3.200.0110.00719.39
7.3.190.0100.00716.47
7.3.180.0060.00916.68
7.3.170.0040.01216.33
7.3.160.0040.01516.21
7.3.120.0100.00614.73
7.2.330.0110.00916.58
7.2.320.0000.02116.58
7.2.310.0120.00816.63
7.2.300.0140.00316.61
7.2.290.0160.00716.59
7.1.200.0060.00616.00
7.1.70.0030.00617.06
7.1.60.0040.01219.17
7.1.50.0100.00717.05
7.1.00.0000.07322.32
7.0.200.0000.00716.68
7.0.140.0030.07722.08
7.0.100.0100.04319.88
7.0.90.0130.07320.00
7.0.80.0070.07719.87
7.0.70.0270.05719.93
7.0.60.0200.08020.02
7.0.50.0030.04320.20
7.0.40.0030.05020.18
7.0.30.0030.09020.00
7.0.20.0130.08020.08
7.0.10.0070.05320.09
7.0.00.0170.04020.09
5.6.250.0070.06320.49
5.6.240.0130.06020.60
5.6.230.0030.05020.63
5.6.220.0070.06320.49
5.6.210.0100.04320.64
5.6.200.0030.07721.06
5.6.190.0030.08721.00
5.6.180.0070.07721.02
5.6.170.0100.05721.08
5.6.160.0070.08021.01
5.6.150.0130.06321.05
5.6.140.0030.08020.94
5.6.130.0100.03721.03
5.6.120.0170.06721.06
5.6.110.0070.07321.07
5.6.100.0030.06020.93
5.6.90.0130.05720.99
5.6.80.0000.05320.48
5.6.70.0070.05720.46
5.6.60.0100.06720.54
5.6.50.0070.05020.32
5.6.40.0070.03720.29
5.6.30.0000.04020.49
5.6.20.0000.04320.43
5.6.10.0070.04020.36
5.6.00.0030.04020.38
5.5.380.0070.04720.34
5.5.370.0200.06720.34
5.5.360.0070.05020.43
5.5.350.0030.05020.41
5.5.340.0030.07720.89
5.5.330.0030.04320.76
5.5.320.0030.08020.82
5.5.310.0030.06720.77
5.5.300.0100.03320.82
5.5.290.0070.04020.88
5.5.280.0000.07020.92
5.5.270.0070.05320.84
5.5.260.0070.10020.86
5.5.250.0130.04320.70
5.5.240.0070.04320.30
5.5.230.0030.04320.13
5.5.220.0100.06720.26
5.5.210.0100.06720.13
5.5.200.0030.04720.11
5.5.190.0100.03720.14
5.5.180.0000.04320.23
5.5.160.0000.04720.27
5.5.150.0070.03020.10
5.5.140.0030.04020.17
5.5.130.0030.03020.10
5.5.120.0070.07720.23
5.5.110.0000.07720.14
5.5.100.0030.07720.13
5.5.90.0100.06019.93
5.5.80.0070.04320.06
5.5.70.0100.04020.05
5.5.60.0100.03020.08
5.5.50.0070.03719.94
5.5.40.0070.05020.05
5.5.30.0070.03720.13
5.5.20.0000.04319.95
5.5.10.0000.04320.02
5.5.00.0000.04320.09
5.4.450.0070.07719.39
5.4.440.0070.05319.23
5.4.430.0000.04719.27
5.4.420.0030.06719.42
5.4.410.0000.04319.18
5.4.400.0070.03719.24
5.4.390.0070.08018.98
5.4.380.0100.07319.14
5.4.370.0130.04719.06
5.4.360.0000.04319.03
5.4.350.0100.03318.79
5.4.340.0000.04019.06
5.4.320.0070.03719.23
5.4.310.0030.03018.82
5.4.300.0070.03318.94
5.4.290.0100.03319.09
5.4.280.0070.03318.96
5.4.270.0100.03019.03
5.4.260.0070.07718.96
5.4.250.0000.06319.14
5.4.240.0030.05319.11
5.4.230.0030.03019.02
5.4.220.0000.04018.78
5.4.210.0000.03318.84
5.4.200.0000.04019.02
5.4.190.0030.03718.98
5.4.180.0070.03318.89
5.4.170.0000.04318.80
5.4.160.0030.04019.01
5.4.150.0000.04319.00
5.4.140.0100.05716.38
5.4.130.0030.03716.33
5.4.120.0000.03716.26
5.4.110.0070.03316.41
5.4.100.0070.03716.21
5.4.90.0000.03716.36
5.4.80.0070.03716.20
5.4.70.0030.03716.32
5.4.60.0000.04016.29
5.4.50.0100.02716.38
5.4.40.0000.04016.46
5.4.30.0070.03316.18
5.4.20.0070.02716.33
5.4.10.0030.05016.23
5.4.00.0000.04015.74
5.3.290.0070.03714.52
5.3.280.0000.04314.59
5.3.270.0070.03314.45
5.3.260.0000.05314.53
5.3.250.0030.03714.61
5.3.240.0070.03014.59
5.3.230.0100.03014.58
5.3.220.0030.05714.52
5.3.210.0070.03314.57
5.3.200.0070.04714.57
5.3.190.0130.03014.50
5.3.180.0000.04014.50
5.3.170.0130.02714.51
5.3.160.0070.03314.40
5.3.150.0130.03714.43
5.3.140.0030.03714.55
5.3.130.0030.03714.54
5.3.120.0000.04014.54
5.3.110.0070.06314.54
5.3.100.0030.03714.03
5.3.90.0100.03014.00
5.3.80.0000.04313.99
5.3.70.0070.02714.00
5.3.60.0030.03713.95
5.3.50.0000.04013.80
5.3.40.0000.04013.94
5.3.30.0000.04013.86
5.3.20.0070.02713.55
5.3.10.0030.02713.51
5.3.00.0070.02713.39
5.2.170.0030.02711.18
5.2.160.0030.02311.14
5.2.150.0030.03011.13
5.2.140.0000.02711.00
5.2.130.0030.02311.09
5.2.120.0000.02711.08
5.2.110.0030.03010.94
5.2.100.0030.03710.96
5.2.90.0000.04711.16
5.2.80.0030.04711.14
5.2.70.0000.04311.13
5.2.60.0000.02711.11
5.2.50.0030.06010.88
5.2.40.0100.04710.84
5.2.30.0100.06010.97
5.2.20.0030.02710.95
5.2.10.0130.04310.92
5.2.00.0070.05710.71
5.1.60.0000.03010.68
5.1.50.0100.04010.68
5.1.40.0100.02710.68
5.1.30.0030.03310.68
5.1.20.0130.04710.68
5.1.10.0070.03310.68
5.1.00.0000.05710.68
5.0.50.0030.02310.68
5.0.40.0000.04710.68
5.0.30.0070.06010.68
5.0.20.0000.04710.68
5.0.10.0070.04010.68
5.0.00.0100.05310.68
4.4.90.0030.01310.68
4.4.80.0000.01710.68
4.4.70.0000.03310.68
4.4.60.0000.04010.68
4.4.50.0000.03310.68
4.4.40.0030.05310.68
4.4.30.0030.02010.68
4.4.20.0070.01710.68
4.4.10.0030.01710.68
4.4.00.0000.05710.68
4.3.110.0000.03710.68
4.3.100.0000.02010.68
4.3.90.0000.04010.68
4.3.80.0070.04310.68
4.3.70.0000.02710.68
4.3.60.0070.03310.68
4.3.50.0000.03710.68
4.3.40.0070.02710.68
4.3.30.0030.02710.68
4.3.20.0000.03710.68
4.3.10.0000.03710.68
4.3.00.0030.03310.68

preferences:
42.55 ms | 401 KiB | 5 Q