3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern='/^(\p{Pd}+\s*2\.2\.|2\.2\.)/mu'; $texts = array( "– 2.2.04 R", "–– 2.2.04.10 C", "–– 2.2.04.1 CO", "–– 2.2.04.2 CO", "–– 2.2.04.3 CO", "–– 2.2.04.4 CO", "–– 2.2.04.5 CO", "–– 2.2.04.6 CO", "–– 2.2.04.7 CO", "–– 2.2.04.8 CO", "–– 2.2.04.9 CO", "foooooooooooo", "barrrrrrrrrr", "-- foobar", "- 1123", ); foreach($texts as $key=>$text) { if(preg_match($pattern, $text)) { $final_texts[] = $text; } } print_r($final_texts);

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.80.0040.00417.00
8.3.70.0120.00616.88
8.3.60.0060.01218.67
8.3.50.0180.00522.94
8.3.40.0150.00018.79
8.3.30.0110.00419.04
8.3.20.0080.00020.34
8.3.10.0080.00021.96
8.3.00.0040.00417.93
8.2.200.0090.00016.63
8.2.190.0120.00616.58
8.2.180.0140.00716.88
8.2.170.0070.00722.96
8.2.160.0130.00020.55
8.2.150.0050.00324.18
8.2.140.0090.00024.66
8.2.130.0070.00726.16
8.2.120.0130.00321.02
8.2.110.0030.00620.88
8.2.100.0100.00318.28
8.2.90.0050.00319.24
8.2.80.0000.00817.97
8.2.70.0000.00917.75
8.2.60.0050.00318.05
8.2.50.0090.00018.07
8.2.40.0000.00818.22
8.2.30.0040.00418.31
8.2.20.0070.00018.02
8.2.10.0040.00418.21
8.2.00.0040.00417.90
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0000.00923.81
8.1.260.0100.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00723.79
8.1.230.0080.00419.22
8.1.220.0000.00817.91
8.1.210.0000.00818.77
8.1.200.0040.00417.50
8.1.190.0080.00017.36
8.1.180.0040.00418.10
8.1.170.0030.00518.71
8.1.160.0050.00322.05
8.1.150.0030.00518.86
8.1.140.0040.00417.62
8.1.130.0000.00717.92
8.1.120.0040.00417.64
8.1.110.0000.00717.44
8.1.100.0070.00017.58
8.1.90.0070.00017.59
8.1.80.0040.00417.66
8.1.70.0030.00317.63
8.1.60.0000.00817.75
8.1.50.0000.00817.72
8.1.40.0000.00717.66
8.1.30.0040.00417.77
8.1.20.0030.00617.77
8.1.10.0000.00717.61
8.1.00.0000.00717.51
8.0.300.0030.00618.77
8.0.290.0000.00817.00
8.0.280.0070.00018.53
8.0.270.0030.00317.24
8.0.260.0050.00317.37
8.0.250.0030.00317.22
8.0.240.0040.00417.21
8.0.230.0000.00817.13
8.0.220.0000.00817.22
8.0.210.0030.00317.18
8.0.200.0060.00017.22
8.0.190.0080.00317.27
8.0.180.0000.00717.17
8.0.170.0040.00417.21
8.0.160.0040.00417.26
8.0.150.0030.00617.07
8.0.140.0110.00017.04
8.0.130.0030.00313.55
8.0.120.0030.00617.02
8.0.110.0050.00217.08
8.0.100.0000.00717.06
8.0.90.0070.00017.07
8.0.80.0070.00717.23
8.0.70.0000.00817.20
8.0.60.0040.00417.15
8.0.50.0040.00417.21
8.0.30.0080.01117.34
8.0.20.0150.01017.40
8.0.10.0040.00417.33
8.0.00.0090.01217.02
7.4.330.0050.00015.18
7.4.320.0000.00716.70
7.4.300.0000.00716.73
7.4.290.0040.00416.82
7.4.280.0030.00316.64
7.4.270.0040.00416.68
7.4.260.0000.00716.77
7.4.250.0070.00016.75
7.4.240.0040.00416.81
7.4.230.0030.00316.63
7.4.220.0110.01416.82
7.4.210.0040.01516.76
7.4.200.0030.00316.98
7.4.160.0100.01316.77
7.4.150.0070.01017.40
7.4.140.0120.00617.86
7.4.130.0070.00916.80
7.4.120.0090.01016.75
7.4.110.0080.00816.86
7.4.100.0060.01516.71
7.4.90.0130.00616.68
7.4.80.0100.01319.39
7.4.70.0100.00616.65
7.4.60.0060.01317.01
7.4.50.0040.00416.82
7.4.40.0100.00616.57
7.4.30.0070.01416.74
7.4.00.0070.00714.92
7.3.330.0030.00413.34
7.3.320.0000.00613.42
7.3.310.0070.00016.52
7.3.300.0000.00716.48
7.3.290.0080.00716.53
7.3.280.0070.00916.46
7.3.270.0040.01317.40
7.3.260.0130.00316.79
7.3.250.0010.01616.59
7.3.240.0130.01316.59
7.3.230.0030.01516.48
7.3.210.0130.00316.92
7.3.200.0060.01219.39
7.3.190.0030.01316.80
7.3.180.0070.01016.84
7.3.170.0140.00316.43
7.3.160.0090.01116.65
7.3.120.0000.01015.31
7.2.330.0040.01516.73
7.2.320.0130.00316.71
7.2.310.0070.01016.83
7.2.300.0090.00916.76
7.2.290.0110.00716.70
7.2.00.0090.00319.77
7.1.100.0030.00618.23
7.1.70.0110.00317.34
7.1.60.0170.00719.40
7.1.50.0000.01117.22
7.1.00.0070.07322.45
7.0.200.0030.00617.05
7.0.140.0000.07321.95
7.0.60.0070.08019.91
7.0.50.0000.04317.89
7.0.40.0100.06320.29
7.0.30.0170.04720.28
7.0.20.0400.07020.22
7.0.10.0100.08320.11
7.0.00.0070.05020.27
5.6.280.0070.07020.91
5.6.210.0000.04320.56
5.6.200.0070.08018.19
5.6.190.0070.08020.55
5.6.180.0330.03320.59
5.6.170.0130.04720.55
5.6.160.0070.05320.59
5.6.150.0030.06318.21
5.6.140.0030.05718.18
5.6.130.0000.07018.18
5.6.120.0070.04021.00
5.6.110.0100.04721.08
5.6.100.0030.08321.04
5.6.90.0100.08020.97
5.6.80.0100.05020.46
5.5.350.0300.07320.38
5.5.340.0000.04317.95
5.5.330.0130.06320.38
5.5.320.0170.04320.27
5.5.310.0270.05020.19
5.5.300.0070.08318.08
5.5.290.0100.03718.03
5.5.280.0070.05020.80
5.5.270.0070.05720.76
5.5.260.0100.08020.76
5.5.250.0000.05020.68
5.5.240.0200.07720.29
5.4.450.0200.05719.28
5.4.440.0330.05019.19
5.4.430.0100.04019.45
5.4.420.0470.05019.46
5.4.410.0500.04019.52
5.4.400.0570.03719.06
5.4.390.0130.04319.13
5.4.380.0370.07718.79
5.4.370.0400.05318.76
5.4.360.0470.05018.51
5.4.350.0370.05018.79
5.4.340.0330.05318.69
5.4.320.0090.04912.48
5.4.310.0060.04512.48
5.4.300.0100.04412.48
5.4.290.0060.04212.48
5.4.280.0090.04612.38
5.4.270.0090.04212.38
5.4.260.0110.03712.38
5.4.250.0130.04012.38
5.4.240.0060.04412.38
5.4.230.0080.04412.37
5.4.220.0090.03712.37
5.4.210.0070.04312.37
5.4.200.0070.03612.37
5.4.190.0070.03512.36
5.4.180.0070.03612.37
5.4.170.0040.04112.38
5.4.160.0090.04012.38
5.4.150.0060.04112.37
5.4.140.0040.04912.05
5.4.130.0070.03812.04
5.4.120.0060.03712.00
5.4.110.0100.03311.99
5.4.100.0050.03611.99
5.4.90.0040.03811.99
5.4.80.0080.03612.00
5.4.70.0080.04311.99
5.4.60.0070.03511.99
5.4.50.0050.03611.99
5.4.40.0040.04011.98
5.4.30.0030.03811.98
5.4.20.0050.03711.98
5.4.10.0110.03711.98
5.4.00.0060.03511.47
5.3.290.0080.03812.80
5.3.280.0070.03612.71
5.3.270.0070.04112.72
5.3.260.0060.03712.72
5.3.250.0060.03712.72
5.3.240.0090.03412.72
5.3.230.0060.03712.70
5.3.220.0060.04312.68
5.3.210.0060.04212.68
5.3.200.0080.04312.68
5.3.190.0100.03812.68
5.3.180.0070.03812.67
5.3.170.0040.04712.67
5.3.160.0060.03712.67
5.3.150.0060.03812.67
5.3.140.0050.03812.66
5.3.130.0060.04912.66
5.3.120.0020.04412.66
5.3.110.0030.04112.66
5.3.100.0080.03412.12
5.3.90.0060.03712.10
5.3.80.0050.03612.09
5.3.70.0050.03712.09
5.3.60.0090.03712.07
5.3.50.0080.03512.02
5.3.40.0020.04112.03
5.3.30.0060.03411.98
5.3.20.0080.03511.77
5.3.10.0040.03511.73
5.3.00.0040.03611.72
5.2.170.0070.0369.21
5.2.160.0080.0439.22
5.2.150.0040.0319.22
5.2.140.0080.0309.21
5.2.130.0090.0329.18
5.2.120.0060.0269.18
5.2.110.0030.0309.19
5.2.100.0050.0299.18
5.2.90.0010.0349.18
5.2.80.0070.0319.18
5.2.70.0070.0299.18
5.2.60.0040.0319.13
5.2.50.0020.0339.09
5.2.40.0050.0289.08
5.2.30.0060.0299.06
5.2.20.0090.0279.05
5.2.10.0050.0318.93
5.2.00.0050.0318.80
5.1.60.0070.0268.07
5.1.50.0050.0248.07
5.1.40.0020.0298.05
5.1.30.0030.0318.39
5.1.20.0070.0278.42
5.1.10.0050.0258.14
5.1.00.0050.0278.14
5.0.50.0060.0186.62
5.0.40.0050.0246.48
5.0.30.0030.0366.30
5.0.20.0050.0206.26
5.0.10.0050.0216.24
5.0.00.0080.0296.23
4.4.90.0020.0244.78
4.4.80.0070.0124.76
4.4.70.0040.0164.75
4.4.60.0050.0194.76
4.4.50.0090.0174.77
4.4.40.0040.0294.71
4.4.30.0030.0154.76
4.4.20.0040.0144.84
4.4.10.0020.0164.85
4.4.00.0020.0254.75
4.3.110.0050.0134.67
4.3.100.0020.0154.66
4.3.90.0060.0114.64
4.3.80.0040.0234.58
4.3.70.0020.0184.63
4.3.60.0040.0164.63
4.3.50.0010.0184.63
4.3.40.0020.0254.54
4.3.30.0060.0163.28
4.3.20.0040.0163.26
4.3.10.0030.0153.22
4.3.00.0030.01715.17

preferences:
28.87 ms | 401 KiB | 5 Q