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' ); foreach($test as $t){ preg_match('/^(\+?\d{1})?\s*(\(\d+\))?[\s-]*([\d-]*)$/', $t, $number[0]); preg_match('/^(\+)?\s*?(\(?\d{4}\)?)/', $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.0070.01418.68
8.3.50.0060.01122.13
8.3.40.0090.00618.92
8.3.30.0120.00319.09
8.3.20.0070.00020.34
8.3.10.0030.00621.92
8.3.00.0040.00422.43
8.2.180.0140.00718.41
8.2.170.0070.01022.96
8.2.160.0000.01420.82
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0060.00326.16
8.2.120.0060.00317.75
8.2.110.0030.00620.52
8.2.100.0080.00317.91
8.2.90.0000.00919.30
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0030.00617.93
8.2.50.0060.00318.07
8.2.40.0050.00318.22
8.2.30.0040.00418.15
8.2.20.0040.00417.82
8.2.10.0050.00319.53
8.2.00.0040.00417.82
8.1.280.0040.01125.92
8.1.270.0050.00323.96
8.1.260.0040.00426.35
8.1.250.0040.01428.09
8.1.240.0030.00621.12
8.1.230.0090.00317.52
8.1.220.0060.00317.74
8.1.210.0030.00518.77
8.1.200.0040.00417.47
8.1.190.0040.00417.53
8.1.180.0070.00418.10
8.1.170.0050.00318.70
8.1.160.0040.00422.10
8.1.150.0070.00018.84
8.1.140.0040.00417.67
8.1.130.0000.00717.88
8.1.120.0000.00717.64
8.1.110.0040.00417.63
8.1.100.0040.00417.66
8.1.90.0040.00417.62
8.1.80.0040.00417.58
8.1.70.0080.00017.50
8.1.60.0030.00517.79
8.1.50.0080.00017.68
8.1.40.0000.00817.66
8.1.30.0000.00817.66
8.1.20.0030.00617.80
8.1.10.0030.00517.71
8.1.00.0080.00017.63
8.0.300.0000.00818.77
8.0.290.0040.00416.88
8.0.280.0070.00018.37
8.0.270.0030.00317.21
8.0.260.0030.00316.97
8.0.250.0070.00017.13
8.0.240.0040.00417.02
8.0.230.0030.00317.11
8.0.220.0040.00316.96
8.0.210.0000.00717.02
8.0.200.0070.00017.15
8.0.190.0000.00817.10
8.0.180.0050.00316.95
8.0.170.0040.00416.96
8.0.160.0050.00317.07
8.0.150.0070.00417.04
8.0.140.0060.00316.92
8.0.130.0050.00013.46
8.0.120.0000.00816.90
8.0.110.0000.00717.08
8.0.100.0040.00417.09
8.0.90.0040.00416.96
8.0.80.0090.01017.09
8.0.70.0030.00517.05
8.0.60.0040.00417.01
8.0.50.0000.00717.07
8.0.30.0100.00917.49
8.0.20.0110.00817.40
8.0.10.0000.00717.05
8.0.00.0070.01017.05
7.4.330.0030.00315.03
7.4.320.0060.00016.77
7.4.300.0000.00616.84
7.4.290.0030.00316.88
7.4.280.0040.00416.73
7.4.270.0070.00016.72
7.4.260.0000.00716.65
7.4.250.0040.00416.74
7.4.240.0040.00416.87
7.4.230.0030.00316.91
7.4.220.0190.00316.67
7.4.210.0100.00416.75
7.4.200.0070.00016.80
7.4.190.0070.00016.98
7.4.160.0060.00916.42
7.4.150.0140.00717.40
7.4.140.0100.01017.86
7.4.130.0120.00616.67
7.4.120.0090.00716.68
7.4.110.0080.00816.82
7.4.100.0030.01416.63
7.4.90.0180.00016.75
7.4.80.0100.00719.39
7.4.70.0100.00716.64
7.4.60.0060.00916.64
7.4.50.0060.00316.76
7.4.40.0060.00622.77
7.4.30.0060.00916.60
7.4.00.0060.01115.27
7.3.330.0000.00513.39
7.3.320.0050.00313.46
7.3.310.0050.00216.39
7.3.300.0050.00216.54
7.3.290.0060.00916.52
7.3.280.0110.00716.46
7.3.270.0090.00917.40
7.3.260.0160.00616.43
7.3.250.0070.01016.61
7.3.240.0180.00616.43
7.3.230.0150.00316.63
7.3.210.0070.01016.65
7.3.200.0070.01319.39
7.3.190.0120.00616.62
7.3.180.0060.01016.39
7.3.170.0080.00816.38
7.3.160.0170.00316.64
7.3.120.0040.01314.69
7.3.110.0120.00615.01
7.3.100.0060.00814.98
7.3.90.0100.00515.09
7.3.80.0100.00514.95
7.3.70.0080.00515.16
7.3.60.0040.01014.88
7.3.50.0030.00915.03
7.3.40.0020.01114.96
7.3.30.0010.00915.08
7.3.20.0080.00516.91
7.3.10.0050.01217.06
7.3.00.0100.00616.79
7.2.330.0030.01516.78
7.2.320.0120.01216.88
7.2.310.0150.00916.91
7.2.300.0140.00416.84
7.2.290.0110.00516.93
7.2.250.0100.00815.34
7.2.240.0080.00915.26
7.2.230.0050.00715.19
7.2.220.0030.00815.25
7.2.210.0080.00815.36
7.2.200.0090.00315.15
7.2.190.0090.00315.03
7.2.180.0090.00615.11
7.2.170.0020.01015.18
7.2.00.0090.00319.53
7.1.330.0060.00816.04
7.1.320.0030.01015.92
7.1.310.0050.01115.83
7.1.300.0090.00515.79
7.1.290.0060.00815.75
7.1.280.0040.01115.92
7.1.270.0030.01116.10
7.1.260.0080.00715.89
7.1.100.0040.00718.30
7.1.70.0050.00317.17
7.1.60.0130.00919.82
7.1.50.0040.01817.07
7.1.00.0000.08022.60
7.0.200.0040.01116.91
7.0.140.0030.07722.18
7.0.60.0100.07719.92
7.0.50.0000.09017.88
7.0.40.0170.03720.32
7.0.30.0300.07720.27
7.0.20.0430.06720.33
7.0.10.0330.07720.13
7.0.00.0170.04020.25
5.6.280.0000.07720.80
5.6.210.0100.07720.69
5.6.200.0100.03718.16
5.6.190.0100.08020.50
5.6.180.0030.04020.47
5.6.170.0400.07320.71
5.6.160.0070.07020.71
5.6.150.0100.07718.21
5.6.140.0130.07018.26
5.6.130.0000.07318.14
5.6.120.0030.04321.03
5.6.110.0170.05020.94
5.6.100.0100.07021.12
5.6.90.0100.08721.01
5.6.80.0030.07720.43
5.6.70.0200.04720.33
5.5.350.0130.03720.47
5.5.340.0000.05317.99
5.5.330.0100.07020.40
5.5.320.0430.07020.35
5.5.310.0270.07720.27
5.5.300.0030.04018.06
5.5.290.0030.05718.01
5.5.280.0030.07020.96
5.5.270.0000.06320.86
5.5.260.0170.05020.95
5.5.250.0230.06320.57
5.5.240.0030.04020.34
5.4.450.0500.03319.20
5.4.440.0630.04019.57
5.4.430.1130.04319.27
5.4.420.0530.04319.54
5.4.410.0170.05018.98
5.4.400.0130.05018.67
5.4.390.0030.06018.75
5.4.380.0270.04018.54
5.4.370.0170.06018.47
5.4.360.0170.06318.54
5.4.350.0270.04718.75
5.4.340.0230.05718.75
5.4.320.0060.03712.48
5.4.310.0040.04112.48
5.4.300.0110.03612.49
5.4.290.0090.03812.48
5.4.280.0070.03612.36
5.4.270.0050.04312.36
5.4.260.0110.03512.36
5.4.250.0080.03912.36
5.4.240.0080.04012.36
5.4.230.0050.03912.36
5.4.220.0030.04012.35
5.4.210.0090.03512.36
5.4.200.0030.04312.36
5.4.190.0040.03912.35
5.4.180.0080.03812.35
5.4.170.0120.04712.36
5.4.160.0060.03912.36
5.4.150.0080.03612.36
5.4.140.0120.03412.04
5.4.130.0070.03612.02
5.4.120.0060.03811.99
5.4.110.0050.04011.98
5.4.100.0060.03611.98
5.4.90.0070.03611.98
5.4.80.0050.04011.98
5.4.70.0040.03911.97
5.4.60.0070.03811.98
5.4.50.0080.03511.97
5.4.40.0090.03311.96
5.4.30.0050.03911.96
5.4.20.0090.04011.96
5.4.10.0110.03311.96
5.4.00.0070.04011.46
5.3.290.0090.04212.80
5.3.280.0060.04012.71
5.3.270.0100.03712.72
5.3.260.0080.04112.72
5.3.250.0080.04112.71
5.3.240.0060.03912.71
5.3.230.0100.03612.71
5.3.220.0080.03712.68
5.3.210.0070.03912.68
5.3.200.0050.03912.68
5.3.190.0100.03412.68
5.3.180.0100.03412.68
5.3.170.0080.04412.66
5.3.160.0050.04412.68
5.3.150.0100.03712.67
5.3.140.0080.03612.66
5.3.130.0100.03612.66
5.3.120.0070.04012.66
5.3.110.0060.04112.66
5.3.100.0080.04312.11
5.3.90.0150.04712.08
5.3.80.0070.03612.08
5.3.70.0090.03612.07
5.3.60.0050.04012.06
5.3.50.0080.03612.00
5.3.40.0050.03912.00
5.3.30.0120.03311.96
5.3.20.0060.03611.74
5.3.10.0090.03311.70
5.3.00.0050.03811.70
5.2.170.0070.0309.19
5.2.160.0040.0319.19
5.2.150.0050.0319.19
5.2.140.0080.0349.19
5.2.130.0070.0319.14
5.2.120.0050.0299.15
5.2.110.0060.0309.15
5.2.100.0100.0259.16
5.2.90.0080.0299.15
5.2.80.0040.0349.15
5.2.70.0040.0329.15
5.2.60.0080.0319.10
5.2.50.0070.0339.07
5.2.40.0070.0279.05
5.2.30.0060.0309.03
5.2.20.0050.0299.02
5.2.10.0060.0328.93
5.2.00.0090.0308.79
5.1.60.0070.0288.07
5.1.50.0060.0268.07
5.1.40.0080.0258.05
5.1.30.0070.0258.39
5.1.20.0060.0298.42
5.1.10.0050.0288.15
5.1.00.0040.0278.15
5.0.50.0050.0206.62
5.0.40.0050.0196.48
5.0.30.0050.0316.29
5.0.20.0040.0206.26
5.0.10.0070.0186.24
5.0.00.0060.0316.23
4.4.90.0050.0154.77
4.4.80.0040.0174.76
4.4.70.0040.0164.75
4.4.60.0050.0144.76
4.4.50.0060.0144.77
4.4.40.0060.0244.71
4.4.30.0040.0174.75
4.4.20.0070.0134.85
4.4.10.0060.0144.84
4.4.00.0030.0274.76
4.3.110.0060.0144.67
4.3.100.0070.0134.66
4.3.90.0030.0164.63
4.3.80.0070.0264.59
4.3.70.0020.0174.63
4.3.60.0040.0164.63
4.3.50.0070.0144.63
4.3.40.0030.0264.54
4.3.30.0030.0183.29
4.3.20.0040.0163.27
4.3.10.0030.0163.23
4.3.00.0030.02015.13

preferences:
54.98 ms | 401 KiB | 5 Q