3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array( '+380671072122','+3 80671072122','+3 8 067 107 21 22','+38(067)1072122','+38 (067) 107 21 22','+3 8067 107-21-22','067 107 21 22','067-107-21-22','+380 67 1072122' ); foreach($test as $t){ preg_match('/^(\+?\d{1})?\s*(\(\d+\))?[\s-]*([\d-]*)$/', $t, $number[0]); preg_match('/^(\+)?(\d{1,3})?\s*(\d{1,2})[\s-]*(\d{1,7})$/', $t, $number[1]); print_r($number); }

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.0100.01018.43
8.3.50.0080.01022.19
8.3.40.0080.00818.92
8.3.30.0070.00719.08
8.3.20.0140.00420.29
8.3.10.0000.00822.04
8.3.00.0050.00322.46
8.2.180.0170.00718.66
8.2.170.0070.00722.96
8.2.160.0140.00720.86
8.2.150.0000.00824.18
8.2.140.0130.00324.66
8.2.130.0070.00026.16
8.2.120.0080.00019.61
8.2.110.0060.00322.34
8.2.100.0000.01217.97
8.2.90.0040.00419.22
8.2.80.0080.00018.03
8.2.70.0060.00317.75
8.2.60.0030.00617.93
8.2.50.0080.00018.07
8.2.40.0000.00818.28
8.2.30.0080.00018.08
8.2.20.0000.00717.89
8.2.10.0000.00817.85
8.2.00.0040.00417.85
8.1.280.0130.00325.92
8.1.270.0030.00522.02
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0090.00024.02
8.1.230.0090.00319.10
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0090.00017.47
8.1.190.0060.00317.53
8.1.180.0060.00318.10
8.1.170.0060.00318.71
8.1.160.0000.00722.05
8.1.150.0000.00818.81
8.1.140.0050.00217.56
8.1.130.0000.00717.82
8.1.120.0020.00517.66
8.1.110.0040.00417.66
8.1.100.0000.00717.58
8.1.90.0040.00417.52
8.1.80.0070.00017.59
8.1.70.0000.00817.65
8.1.60.0030.00617.74
8.1.50.0030.00617.67
8.1.40.0030.00517.71
8.1.30.0030.00517.79
8.1.20.0060.00317.65
8.1.10.0000.00717.71
8.1.00.0040.00417.44
8.0.300.0060.00318.77
8.0.290.0000.00717.04
8.0.280.0030.00318.45
8.0.270.0000.00717.25
8.0.260.0040.00416.99
8.0.250.0030.00317.14
8.0.240.0000.00817.00
8.0.230.0040.00417.16
8.0.220.0030.00316.99
8.0.210.0030.00317.06
8.0.200.0070.00017.15
8.0.190.0040.00417.12
8.0.180.0040.00417.11
8.0.170.0000.00916.98
8.0.160.0030.00517.10
8.0.150.0040.00417.02
8.0.140.0060.00317.00
8.0.130.0000.00513.47
8.0.120.0040.00417.00
8.0.110.0040.00417.04
8.0.100.0050.00316.95
8.0.90.0030.00517.10
8.0.80.0060.01017.04
8.0.70.0040.00417.05
8.0.60.0050.00316.95
8.0.50.0000.00717.09
8.0.30.0140.00917.57
8.0.20.0140.00517.40
8.0.10.0000.00717.11
8.0.00.0180.00316.71
7.4.330.0000.00615.17
7.4.320.0000.00816.71
7.4.300.0030.00316.75
7.4.290.0070.00016.72
7.4.280.0050.00316.82
7.4.270.0040.00416.80
7.4.260.0000.00916.82
7.4.250.0050.00316.77
7.4.240.0020.00516.84
7.4.230.0000.00716.90
7.4.220.0100.00716.83
7.4.210.0080.00616.77
7.4.200.0030.00316.81
7.4.190.0000.00716.89
7.4.160.0070.01016.71
7.4.150.0110.00717.40
7.4.140.0130.00517.86
7.4.130.0080.01216.72
7.4.120.0090.01016.71
7.4.110.0090.00916.47
7.4.100.0070.01116.55
7.4.90.0140.00316.69
7.4.80.0030.01516.55
7.4.70.0060.01316.53
7.4.60.0060.01616.84
7.4.50.0030.00616.54
7.4.40.0140.00222.77
7.4.30.0040.01416.70
7.4.00.0020.01515.14
7.3.330.0000.00613.32
7.3.320.0050.00013.38
7.3.310.0000.00716.42
7.3.300.0040.00316.52
7.3.290.0040.01116.48
7.3.280.0040.01316.51
7.3.270.0080.00817.40
7.3.260.0130.00616.76
7.3.250.0080.01216.62
7.3.240.0190.00316.71
7.3.230.0140.00416.41
7.3.210.0130.00316.66
7.3.200.0120.01019.39
7.3.190.0060.01116.66
7.3.180.0140.00716.71
7.3.170.0040.01516.52
7.3.160.0140.00716.54
7.3.120.0060.01114.94
7.3.110.0030.01014.90
7.3.100.0090.00615.29
7.3.90.0110.00715.03
7.3.80.0060.00915.01
7.3.70.0090.00415.17
7.3.60.0040.01214.99
7.3.50.0060.00914.79
7.3.40.0040.01414.94
7.3.30.0040.00714.82
7.3.20.0090.00316.79
7.3.10.0030.01016.63
7.3.00.0030.00916.95
7.2.330.0100.01316.77
7.2.320.0040.01216.84
7.2.310.0070.01016.83
7.2.300.0090.00916.68
7.2.290.0130.00316.89
7.2.250.0070.00714.87
7.2.240.0000.02115.46
7.2.230.0030.01415.38
7.2.220.0060.00915.19
7.2.210.0080.00415.19
7.2.200.0080.00415.43
7.2.190.0060.00315.20
7.2.180.0080.00315.36
7.2.170.0080.00615.20
7.2.60.0100.00317.20
7.2.50.0090.00017.01
7.1.330.0040.01116.13
7.1.320.0030.01016.14
7.1.310.0070.00715.95
7.1.300.0000.01315.80
7.1.290.0100.00016.05
7.1.280.0090.00615.70
7.1.270.0090.00615.84
7.1.260.0130.00316.20
7.1.200.0030.00715.96
7.1.70.0040.00417.08
7.1.60.0100.01419.82
7.1.50.0110.01116.93
7.1.00.0030.07722.50
7.0.200.0070.00416.82
7.0.140.0030.07322.00
7.0.60.0030.04019.80
7.0.50.0030.05717.98
7.0.40.0070.04020.05
7.0.30.0270.08320.32
7.0.20.0370.07320.11
7.0.10.0230.04320.11
7.0.00.0000.08320.16
5.6.280.0070.07321.12
5.6.210.0130.07320.46
5.6.200.0030.04718.16
5.6.190.0170.08020.50
5.6.180.3630.04320.51
5.6.170.0230.04720.52
5.6.160.0070.05320.57
5.6.150.0100.07318.21
5.6.140.0070.08018.18
5.6.130.0170.06018.26
5.6.120.0070.06721.09
5.6.110.0130.07721.13
5.6.100.0170.06721.02
5.6.90.0030.06321.02
5.6.80.0100.07720.36
5.6.70.4070.04020.42
5.5.350.0030.08320.39
5.5.340.0130.07317.96
5.5.330.0000.08020.40
5.5.320.0370.05020.34
5.5.310.0330.07020.26
5.5.300.0100.07718.08
5.5.290.0100.07017.95
5.5.280.0030.06020.88
5.5.270.0130.07320.87
5.5.260.0030.06020.87
5.5.250.0200.08020.49
5.5.240.0130.07720.37
5.4.450.0270.03319.39
5.4.440.0000.04019.47
5.4.430.0300.04319.32
5.4.420.0170.04319.46
5.4.410.0230.07018.98
5.4.400.0170.05318.52
5.4.390.0170.05318.69
5.4.380.0170.05718.79
5.4.370.0330.04018.73
5.4.360.0400.04718.69
5.4.350.0300.04318.72
5.4.340.0430.04318.78
5.4.320.0080.04112.49
5.4.310.0060.04412.48
5.4.300.0070.04412.49
5.4.290.0090.04412.48
5.4.280.0080.03412.36
5.4.270.0130.04212.36
5.4.260.0100.05112.36
5.4.250.0080.05012.36
5.4.240.0110.04912.36
5.4.230.0110.03712.36
5.4.220.0040.03912.35
5.4.210.0090.03712.35
5.4.200.0060.04012.36
5.4.190.0100.03312.35
5.4.180.0050.03912.35
5.4.170.0080.03512.36
5.4.160.0090.03412.36
5.4.150.0080.03412.35
5.4.140.0060.03812.04
5.4.130.0090.03312.03
5.4.120.0090.03311.98
5.4.110.0100.03611.98
5.4.100.0070.03611.98
5.4.90.0040.03911.98
5.4.80.0080.03711.98
5.4.70.0060.03611.97
5.4.60.0050.03711.97
5.4.50.0100.03311.97
5.4.40.0070.03511.96
5.4.30.0090.03511.96
5.4.20.0050.03711.96
5.4.10.0130.03311.96
5.4.00.0070.03911.46
5.3.290.0060.04612.80
5.3.280.0130.03712.71
5.3.270.0120.04012.73
5.3.260.0060.04012.72
5.3.250.0110.03412.72
5.3.240.0080.03612.72
5.3.230.0100.03512.71
5.3.220.0110.03312.68
5.3.210.0090.04212.68
5.3.200.0070.03712.68
5.3.190.0070.03812.68
5.3.180.0100.03412.67
5.3.170.0100.03412.67
5.3.160.0070.03812.67
5.3.150.0100.03612.67
5.3.140.0100.03712.66
5.3.130.0080.03812.66
5.3.120.0120.03412.66
5.3.110.0080.03912.66
5.3.100.0070.03712.12
5.3.90.0070.03612.08
5.3.80.0070.03712.07
5.3.70.0090.04012.08
5.3.60.0050.04612.07
5.3.50.0060.04712.00
5.3.40.0070.04212.00
5.3.30.0070.03611.96
5.3.20.0070.03511.74
5.3.10.0070.03611.71
5.3.00.0080.03911.70
5.2.170.0080.0329.19
5.2.160.0020.0339.19
5.2.150.0050.0319.19
5.2.140.0070.0309.19
5.2.130.0060.0309.15
5.2.120.0060.0309.15
5.2.110.0050.0319.16
5.2.100.0100.0249.16
5.2.90.0090.0269.15
5.2.80.0060.0309.15
5.2.70.0060.0289.14
5.2.60.0030.0339.10
5.2.50.0080.0319.07
5.2.40.0060.0379.05
5.2.30.0120.0389.04
5.2.20.0070.0419.02
5.2.10.0100.0238.93
5.2.00.0060.0288.79
5.1.60.0050.0238.07
5.1.50.0080.0238.07
5.1.40.0070.0238.05
5.1.30.0090.0268.39
5.1.20.0070.0278.42
5.1.10.0050.0278.14
5.1.00.0050.0268.15
5.0.50.0060.0196.62
5.0.40.0050.0196.48
5.0.30.0040.0326.29
5.0.20.0040.0216.26
5.0.10.0020.0246.24
5.0.00.0100.0326.23
4.4.90.0040.0164.78
4.4.80.0020.0174.75
4.4.70.0050.0154.76
4.4.60.0060.0144.76
4.4.50.0070.0134.77
4.4.40.0060.0234.71
4.4.30.0050.0194.76
4.4.20.0050.0154.85
4.4.10.0050.0154.84
4.4.00.0060.0274.76
4.3.110.0030.0184.67
4.3.100.0070.0134.66
4.3.90.0080.0154.63
4.3.80.0040.0304.58
4.3.70.0040.0144.63
4.3.60.0020.0174.63
4.3.50.0030.0174.62
4.3.40.0060.0294.54
4.3.30.0040.0173.29
4.3.20.0030.0183.27
4.3.10.0060.0163.23
4.3.00.0070.02013.03

preferences:
38.43 ms | 401 KiB | 5 Q