3v4l.org

run code in 300+ PHP versions simultaneously
<?php $expr = <<<REGEX / \b # word boundary [a-z]{2,3} # 2 or 3 letters \s* # optional spaces [0-9]{2,3} # 2 or 3 digits (?: # start optional non-capturing group \s* # optional spaces [a-z] # single letter )? # end optional non-capturing group \b # word boundary /ix REGEX; $strs = array( 'Honda : CRF 2005 honda crf 50 dirt bike pit bike', 'Honda : XR 2001 honda xr 400 r', 'Honda : CRF 2005 honda crf50 dirt bike pit bike', 'Honda : XR 2001 honda xr400r', ); foreach ($strs as $str) { if (preg_match($expr, $str, $matches)) { var_dump($matches[0]); } }

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.40.0060.00918.82
8.3.30.0070.00719.11
8.3.20.0050.00220.22
8.3.10.0080.00020.79
8.3.00.0000.00919.63
8.2.170.0150.00022.96
8.2.160.0110.00320.43
8.2.150.0060.00324.18
8.2.140.0070.00724.66
8.2.130.0060.00326.16
8.2.120.0080.00022.20
8.2.110.0060.00320.35
8.2.100.0040.00818.03
8.2.90.0040.00419.11
8.2.80.0040.00417.97
8.2.70.0080.00017.88
8.2.60.0090.00018.05
8.2.50.0030.00618.07
8.2.40.0050.00318.34
8.2.30.0030.00618.14
8.2.20.0040.00417.99
8.2.10.0000.00718.18
8.2.00.0040.00417.95
8.1.270.0030.00623.96
8.1.260.0030.00526.35
8.1.250.0090.00028.09
8.1.240.0000.00923.91
8.1.230.0040.00719.14
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0060.00317.48
8.1.190.0030.00517.35
8.1.180.0050.00218.10
8.1.170.0000.00818.62
8.1.160.0000.00721.94
8.1.150.0040.00418.86
8.1.140.0050.00317.61
8.1.130.0030.00317.88
8.1.120.0050.00317.66
8.1.110.0000.00717.58
8.1.100.0040.00417.71
8.1.90.0040.00417.65
8.1.80.0000.00717.57
8.1.70.0040.00417.54
8.1.60.0040.00417.66
8.1.50.0030.00517.73
8.1.40.0080.00017.71
8.1.30.0050.00517.75
8.1.20.0050.00317.87
8.1.10.0040.00417.73
8.1.00.0040.00417.67
8.0.300.0070.00018.77
8.0.290.0040.00417.00
8.0.280.0030.00318.48
8.0.270.0000.00817.30
8.0.260.0000.00717.22
8.0.250.0030.00317.14
8.0.240.0000.00617.17
8.0.230.0040.00417.01
8.0.220.0000.00717.08
8.0.210.0030.00317.01
8.0.200.0000.00717.07
8.0.190.0000.00717.19
8.0.180.0040.00417.21
8.0.170.0030.00617.12
8.0.160.0030.00417.07
8.0.150.0040.00416.97
8.0.140.0030.00317.08
8.0.130.0040.00413.64
8.0.120.0030.00517.09
8.0.110.0040.00417.04
8.0.100.0040.00417.07
8.0.90.0040.00417.24
8.0.80.0070.01017.04
8.0.70.0040.00517.04
8.0.60.0040.00417.00
8.0.50.0000.00716.91
8.0.30.0060.01317.24
8.0.20.0070.01317.42
8.0.10.0070.00017.09
8.0.00.0110.00616.98
7.4.330.0030.00315.16
7.4.320.0060.00016.68
7.4.300.0030.00316.65
7.4.290.0030.00316.84
7.4.280.0030.00516.82
7.4.270.0040.00416.70
7.4.260.0000.00716.79
7.4.250.0050.00216.71
7.4.240.0020.00516.71
7.4.230.0030.00316.62
7.4.220.0030.02216.79
7.4.210.0090.01116.89
7.4.200.0060.00316.58
7.4.160.0050.01116.73
7.4.150.0110.00717.40
7.4.140.0100.00717.86
7.4.130.0140.00316.76
7.4.120.0120.00416.81
7.4.110.0090.00916.99
7.4.100.0150.01316.65
7.4.90.0110.00616.89
7.4.80.0030.01419.39
7.4.70.0070.01116.68
7.4.60.0100.00616.74
7.4.50.0000.00416.68
7.4.40.0140.00316.74
7.4.30.0090.01316.78
7.4.10.0090.00915.06
7.4.00.0070.00815.12
7.3.330.0050.00013.42
7.3.320.0030.00313.34
7.3.310.0040.00416.39
7.3.300.0050.00216.54
7.3.290.0080.00816.51
7.3.280.0070.01116.48
7.3.270.0060.01217.40
7.3.260.0190.00317.00
7.3.250.0090.00816.63
7.3.240.0130.00316.48
7.3.230.0080.00816.73
7.3.210.0030.01316.53
7.3.200.0070.01119.39
7.3.190.0100.00716.59
7.3.180.0130.00916.75
7.3.170.0130.00416.55
7.3.160.0100.00716.66
7.3.130.0070.01015.34
7.3.120.0130.00614.81
7.3.110.0040.01114.95
7.3.100.0060.00815.26
7.3.90.0070.01314.95
7.3.80.0030.01715.05
7.3.70.0060.01014.97
7.3.60.0080.00315.07
7.3.50.0060.00615.19
7.3.40.0060.01215.18
7.3.30.0000.00814.98
7.3.20.0000.01216.95
7.3.10.0030.01216.98
7.3.00.0030.00716.80
7.2.330.0140.00816.81
7.2.320.0100.00716.70
7.2.310.0120.00616.79
7.2.300.0060.01016.65
7.2.290.0030.02016.96
7.2.260.0030.01615.20
7.2.250.0060.01215.42
7.2.240.0070.00715.10
7.2.230.0090.00615.37
7.2.220.0090.00315.15
7.2.210.0030.01015.09
7.2.200.0080.00015.19
7.2.190.0120.00015.09
7.2.180.0100.00715.22
7.2.170.0030.00515.31
7.2.160.0000.01315.22
7.2.150.0000.01217.06
7.2.140.0130.00317.13
7.2.130.0080.00317.08
7.2.120.0040.01117.23
7.2.110.0000.00917.21
7.2.100.0030.00917.07
7.2.90.0040.00417.19
7.2.80.0060.00617.21
7.2.70.0070.00317.14
7.2.60.0030.01016.98
7.2.50.0070.00417.22
7.2.40.0030.00717.13
7.2.30.0030.00616.98
7.2.20.0060.00616.93
7.2.10.0030.01017.15
7.2.00.0090.00518.49
7.1.330.0070.00715.85
7.1.320.0100.00615.98
7.1.310.0030.01016.17
7.1.300.0030.01416.02
7.1.290.0060.00615.61
7.1.280.0030.00916.06
7.1.270.0070.00715.99
7.1.260.0040.00416.00
7.1.250.0000.00916.12
7.1.240.0060.00615.96
7.1.230.0000.00816.11
7.1.220.0000.00816.00
7.1.210.0030.00715.66
7.1.200.0070.00615.95
7.1.190.0120.00015.89
7.1.180.0030.00716.05
7.1.170.0040.01115.98
7.1.160.0000.01116.07
7.1.150.0030.01215.91
7.1.140.0100.00315.86
7.1.130.0000.01316.00
7.1.120.0040.01116.12
7.1.110.0030.01016.14
7.1.100.0050.01117.14
7.1.90.0070.01016.03
7.1.80.0000.01316.12
7.1.70.0010.00816.69
7.1.60.0020.01317.57
7.1.50.0100.00716.64
7.1.40.0000.01515.97
7.1.30.0070.00415.85
7.1.20.0030.00615.80
7.1.10.0130.00016.05
7.1.00.0050.04319.13
7.0.330.0070.00715.79
7.0.320.0000.01315.41
7.0.310.0110.00415.43
7.0.300.0100.00315.29
7.0.290.0030.01315.58
7.0.280.0090.00615.71
7.0.270.0030.01115.74
7.0.260.0060.00615.46
7.0.250.0030.01015.34
7.0.240.0000.01215.70
7.0.230.0090.00615.47
7.0.220.0030.00615.36
7.0.210.0070.00415.63
7.0.200.0010.00716.18
7.0.190.0060.00315.64
7.0.180.0100.00315.30
7.0.170.0070.00715.70
7.0.160.0060.00615.58
7.0.150.0000.01315.36
7.0.140.0050.03818.86
7.0.130.0070.00715.55
7.0.120.0090.00615.73
7.0.110.0110.00315.67
7.0.100.0040.00815.57
7.0.90.0080.00415.68
7.0.80.0000.01315.73
7.0.70.0030.01015.70
7.0.60.0080.04317.78
7.0.50.0120.02516.75
7.0.40.0110.03816.85
7.0.30.0310.04017.07
7.0.20.0180.04316.78
7.0.10.0070.03317.01
7.0.00.0030.04816.80
5.6.400.0030.00514.55
5.6.390.0080.00314.39
5.6.380.0120.00014.20
5.6.370.0030.01114.74
5.6.360.0000.00914.30
5.6.350.0060.00314.50
5.6.340.0100.00014.37
5.6.330.0090.00614.28
5.6.320.0000.01414.64
5.6.310.0000.01314.39
5.6.300.0150.00314.52
5.6.290.0030.01014.38
5.6.280.0100.03617.79
5.6.270.0070.00714.57
5.6.260.0060.00614.34
5.6.250.0120.00314.63
5.6.240.0060.00614.24
5.6.230.0100.00014.43
5.6.220.0130.00314.52
5.6.210.0090.02017.47
5.6.200.0060.03216.18
5.6.190.0060.04617.29
5.6.180.0100.02817.48
5.6.170.0190.02217.42
5.6.160.0050.04717.35
5.6.150.0070.04716.37
5.6.140.0050.03816.29
5.6.130.0080.04516.25
5.6.120.0130.03517.67
5.6.110.0130.04317.80
5.6.100.0050.03717.83
5.6.90.0190.02517.82
5.6.80.0030.03517.34
5.6.70.2200.02717.32
5.6.60.0060.00314.36
5.6.50.0000.01214.20
5.6.40.0040.00414.30
5.6.30.0120.00014.56
5.6.20.0090.00314.34
5.6.10.0030.00714.36
5.6.00.0030.01214.23
5.5.380.0050.00514.18
5.5.370.0050.00914.13
5.5.360.0040.01114.44
5.5.350.0120.04617.34
5.5.340.0090.04116.14
5.5.330.0020.03517.26
5.5.320.0170.02417.24
5.5.310.0130.03117.39
5.5.300.0100.03016.34
5.5.290.0050.04516.27
5.5.280.0100.02217.71
5.5.270.0100.03217.57
5.5.260.0100.02517.51
5.5.250.0080.03517.58
5.5.240.1780.02417.10
5.5.230.0100.00314.08
5.5.220.0000.01114.13
5.5.210.0120.00314.38
5.5.200.0090.00614.23
5.5.190.0060.00614.38
5.5.180.0030.00614.21
5.5.170.0070.01014.41
5.5.160.0070.00714.36
5.5.150.0040.00814.08
5.5.140.0070.00314.02
5.5.130.0040.00414.23
5.5.120.0000.01314.13
5.5.110.0030.00614.38
5.5.100.0060.00914.33
5.5.90.0100.00614.20
5.5.80.0040.00414.43
5.5.70.0060.00613.96
5.5.60.0000.01114.34
5.5.50.0070.00714.08
5.5.40.0080.00414.19
5.5.30.0060.00614.17
5.5.20.0060.00314.41
5.5.10.0000.01314.44
5.5.00.0080.00514.27
5.4.450.0420.03915.13
5.4.440.0030.03315.29
5.4.430.0570.03015.14
5.4.420.0340.00115.21
5.4.410.0360.00115.28
5.4.400.0330.00315.09
5.4.390.0320.00415.08
5.4.380.0350.00215.04
5.4.370.0330.00515.01
5.4.360.0320.00214.99
5.4.350.0330.00315.05
5.4.340.0330.00415.10
5.4.330.0030.00611.04
5.4.320.0050.01911.64
5.4.310.0060.02311.79
5.4.300.0040.02311.88
5.4.290.0030.02311.62
5.4.280.0050.02011.63
5.4.270.0070.02111.71
5.4.260.0050.02111.71
5.4.250.0060.02111.68
5.4.240.0100.01711.63
5.4.230.0060.02111.67
5.4.220.0060.02311.56
5.4.210.0060.02511.67
5.4.200.0040.02311.61
5.4.190.0050.02011.63
5.4.180.0040.02211.60
5.4.170.0080.01811.73
5.4.160.0060.02011.60
5.4.150.0060.02111.65
5.4.140.0080.01911.41
5.4.130.0020.02411.57
5.4.120.0050.02011.39
5.4.110.0040.02111.60
5.4.100.0040.02211.33
5.4.90.0050.02011.62
5.4.80.0050.02111.58
5.4.70.0040.02211.60
5.4.60.0040.02211.49
5.4.50.0080.02111.55
5.4.40.0070.02011.56
5.4.30.0070.01911.49
5.4.20.0020.02111.39
5.4.10.0080.01611.52
5.4.00.0060.02011.09
5.3.290.0080.03612.80
5.3.280.0050.03812.70
5.3.270.0080.03612.73
5.3.260.0050.04012.72
5.3.250.0080.04512.72
5.3.240.0070.03712.72
5.3.230.0060.03712.71
5.3.220.0090.03412.68
5.3.210.0060.03912.68
5.3.200.0130.02912.68
5.3.190.0080.03712.68
5.3.180.0070.03912.68
5.3.170.0080.03712.67
5.3.160.0070.03612.68
5.3.150.0060.03712.67
5.3.140.0070.03712.66
5.3.130.0060.03912.66
5.3.120.0080.03712.65
5.3.110.0060.03812.66
5.3.100.0050.04012.12
5.3.90.0060.03612.08
5.3.80.0050.03912.07
5.3.70.0050.03612.08
5.3.60.0080.03512.06
5.3.50.0050.03712.00
5.3.40.0050.03512.00
5.3.30.0050.03411.96
5.3.20.0080.03311.74
5.3.10.0070.03211.70
5.3.00.0060.04111.69
5.2.170.0060.0339.20
5.2.160.0050.0309.19
5.2.150.0060.0399.20
5.2.140.0070.0379.19
5.2.130.0060.0299.15
5.2.120.0050.0279.15
5.2.110.0040.0299.16
5.2.100.0030.0309.15
5.2.90.0060.0329.15
5.2.80.0030.0309.15
5.2.70.0060.0289.14
5.2.60.0090.0279.10
5.2.50.0060.0289.07
5.2.40.0090.0249.05
5.2.30.0070.0319.03
5.2.20.0060.0279.04
5.2.10.0050.0288.95
5.2.00.0060.0298.81
5.1.60.0050.0248.09
5.1.50.0050.0248.09
5.1.40.0040.0258.07
5.1.30.0050.0278.42
5.1.20.0050.0258.44
5.1.10.0070.0298.16
5.1.00.0060.0248.16
5.0.50.0050.0196.64
5.0.40.0030.0216.51
5.0.30.0040.0306.32
5.0.20.0040.0176.29
5.0.10.0040.0216.27
5.0.00.0030.0326.27
4.4.90.0020.0194.78
4.4.80.0030.0154.76
4.4.70.0020.0164.76
4.4.60.0030.0144.75
4.4.50.0020.0154.77
4.4.40.0060.0224.71
4.4.30.0040.0144.76
4.4.20.0040.0204.85
4.4.10.0030.0194.84
4.4.00.0040.0284.76
4.3.110.0020.0194.67
4.3.100.0040.0194.66
4.3.90.0010.0164.63
4.3.80.0020.0244.58
4.3.70.0020.0164.63
4.3.60.0050.0124.63
4.3.50.0020.0194.63
4.3.40.0040.0254.53
4.3.30.0010.0173.31
4.3.20.0010.0203.29
4.3.10.0010.0163.25
4.3.00.0100.0177.17

preferences:
38.01 ms | 400 KiB | 5 Q