3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/((?<!\w)#\w+)/i'; $subject = <<<EOT Blablalb #toto zdjsdf #ho_yeah EOT; $hashtags = []; $result = preg_replace_callback('/(\s#\w+)/i', function ($matches) use(&$hastags) { var_dump($matches); $hashtags[] = trim($matches[0]); return ''; }, $subject); var_dump($result, $hashtags);

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.0040.01116.63
8.3.50.0110.01022.14
8.3.40.0090.00618.91
8.3.30.0040.01519.22
8.3.20.0030.00520.31
8.3.10.0030.00623.50
8.3.00.0000.00820.89
8.2.180.0110.00716.63
8.2.170.0090.00622.96
8.2.160.0030.01020.58
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0030.00621.10
8.2.110.0040.00721.08
8.2.100.0030.00919.50
8.2.90.0050.00219.35
8.2.80.0050.00317.97
8.2.70.0080.00417.88
8.2.60.0030.00618.05
8.2.50.0000.00818.07
8.2.40.0000.00820.96
8.2.30.0050.00318.41
8.2.20.0060.00317.78
8.2.10.0040.00418.03
8.2.00.0090.00017.89
8.1.280.0090.00625.92
8.1.270.0080.00023.88
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0000.00920.86
8.1.230.0040.00719.09
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.01117.60
8.1.190.0000.00817.50
8.1.180.0000.00818.10
8.1.170.0080.00018.58
8.1.160.0070.00022.09
8.1.150.0050.00218.73
8.1.140.0000.00717.56
8.1.130.0030.00317.73
8.1.120.0030.00317.51
8.1.110.0040.00417.62
8.1.100.0040.00417.52
8.1.90.0070.00017.60
8.1.80.0000.00817.69
8.1.70.0030.00317.45
8.1.60.0040.00417.64
8.1.50.0040.00417.64
8.1.40.0070.00017.61
8.1.30.0060.00317.80
8.1.20.0080.00017.82
8.1.10.0040.00417.66
8.1.00.0000.00817.68
8.0.300.0000.00718.77
8.0.290.0000.00817.18
8.0.280.0030.00418.38
8.0.270.0040.00417.16
8.0.260.0060.00017.30
8.0.250.0070.00017.17
8.0.240.0030.00517.16
8.0.230.0000.00717.14
8.0.220.0030.00317.17
8.0.210.0000.00817.08
8.0.200.0030.00517.19
8.0.190.0040.00317.19
8.0.180.0050.00217.02
8.0.170.0040.00417.02
8.0.160.0030.00517.03
8.0.150.0040.00417.11
8.0.140.0050.00217.05
8.0.130.0060.00013.57
8.0.120.0070.00016.96
8.0.110.0040.00417.13
8.0.100.0040.00417.00
8.0.90.0040.00417.00
8.0.80.0100.00617.06
8.0.70.0000.00716.96
8.0.60.0000.00717.05
8.0.50.0050.00316.93
8.0.30.0100.01017.05
8.0.20.0070.01217.51
8.0.10.0050.00217.27
8.0.00.0080.01116.87
7.4.330.0050.00015.02
7.4.320.0000.00616.70
7.4.300.0000.00716.72
7.4.290.0070.00016.78
7.4.280.0050.00516.72
7.4.270.0000.00716.73
7.4.260.0030.00316.63
7.4.250.0000.00816.61
7.4.240.0030.00416.75
7.4.230.0080.00016.75
7.4.220.0110.00716.84
7.4.210.0040.01116.78
7.4.200.0020.00516.84
7.4.190.0000.00816.99
7.4.160.0090.00616.94
7.4.150.0040.01317.40
7.4.140.0110.00817.86
7.4.130.0100.01016.76
7.4.120.0110.00616.61
7.4.110.0090.00916.58
7.4.100.0070.01116.79
7.4.90.0150.00316.71
7.4.80.0100.01619.39
7.4.70.0110.00616.71
7.4.60.0030.01416.68
7.4.50.0000.00916.80
7.4.40.0100.00916.56
7.4.30.0090.00916.79
7.4.00.0100.00715.26
7.3.330.0000.00513.45
7.3.320.0000.00513.57
7.3.310.0040.00416.48
7.3.300.0030.00316.57
7.3.290.0060.01316.51
7.3.280.0100.00816.49
7.3.270.0110.00817.40
7.3.260.0150.00316.75
7.3.250.0070.01216.54
7.3.240.0130.01016.50
7.3.230.0090.00916.47
7.3.210.0110.00616.48
7.3.200.0070.01519.39
7.3.190.0080.00816.70
7.3.180.0060.01016.80
7.3.170.0060.00916.61
7.3.160.0150.00616.82
7.3.120.0080.00815.05
7.3.110.0050.01114.93
7.3.100.0030.01014.96
7.3.90.0080.00714.94
7.3.80.0040.01015.20
7.3.70.0050.00715.02
7.3.60.0090.00515.00
7.3.50.0060.01215.07
7.3.40.0030.00815.10
7.3.30.0060.00614.90
7.3.20.0000.01316.93
7.3.10.0100.00316.95
7.3.00.0100.00516.79
7.2.330.0210.00516.94
7.2.320.0110.00816.84
7.2.310.0100.00716.84
7.2.300.0030.01316.72
7.2.290.0040.01416.95
7.2.250.0110.00715.08
7.2.240.0050.01415.19
7.2.230.0100.00815.18
7.2.220.0030.00815.18
7.2.210.0050.01115.29
7.2.200.0070.01015.17
7.2.190.0030.01015.19
7.2.180.0020.01515.06
7.2.170.0090.00715.12
7.2.160.0030.01014.96
7.2.150.0130.00616.82
7.2.140.0060.00916.92
7.2.130.0100.00316.91
7.2.120.0080.00317.07
7.2.110.0070.01016.88
7.2.100.0090.00617.15
7.2.90.0000.01417.01
7.2.80.0030.00817.17
7.2.70.0030.01017.29
7.2.60.0030.01017.02
7.2.50.0040.00816.81
7.2.40.0040.01516.92
7.2.30.0070.01017.02
7.2.20.0090.00917.07
7.2.10.0100.00717.28
7.2.00.0040.01118.30
7.1.330.0050.01116.02
7.1.320.0110.00316.03
7.1.310.0080.00915.94
7.1.300.0050.00815.85
7.1.290.0060.01015.83
7.1.280.0050.01216.07
7.1.270.0040.00715.98
7.1.260.0030.01215.96
7.1.250.0060.00616.13
7.1.100.0120.00618.53
7.1.70.0000.00717.16
7.1.60.0040.01619.46
7.1.50.0130.01016.83
7.1.00.0170.06022.45
7.0.200.0040.00416.88
7.0.140.0030.07322.12
7.0.60.0070.03719.86
7.0.50.0070.06317.90
7.0.40.0070.05720.13
7.0.30.0230.04020.03
7.0.20.0330.07320.29
7.0.10.0070.09020.17
7.0.00.0130.08020.09
5.6.280.0030.07320.89
5.6.210.0070.08020.70
5.6.200.0030.07718.18
5.6.190.0070.09020.77
5.6.180.0030.06320.57
5.6.170.0300.05320.62
5.6.160.0030.08320.43
5.6.150.0070.04318.27
5.6.140.0130.08018.15
5.6.130.0070.06318.17
5.6.120.0130.07321.01
5.6.110.0130.04021.05
5.6.100.0030.09021.13
5.6.90.0070.05321.08
5.6.80.0100.07020.39
5.5.350.0100.05320.35
5.5.340.0030.04017.91
5.5.330.0070.06720.29
5.5.320.0300.07720.29
5.5.310.0200.04320.38
5.5.300.0000.04317.97
5.5.290.0100.04717.92
5.5.280.0030.05320.75
5.5.270.0070.04020.81
5.5.260.0100.05320.84
5.5.250.0070.06720.69
5.5.240.0070.07720.26
5.4.450.0330.03719.41
5.4.440.0000.04719.46
5.4.430.0470.04719.48
5.4.420.0100.05019.46
5.4.410.0470.03719.21
5.4.400.0530.03719.00
5.4.390.0870.04018.84
5.4.380.0130.06018.70
5.4.370.0170.05018.80
5.4.360.0170.05318.58
5.4.350.0270.04318.68
5.4.340.0230.04318.56
5.4.320.0030.03912.50
5.4.310.0070.03812.50
5.4.300.0100.06312.51
5.4.290.0070.06712.50
5.4.280.0130.05612.39
5.4.270.0090.05312.39
5.4.260.0100.04612.39
5.4.250.0090.04312.39
5.4.240.0100.04912.39
5.4.230.0120.05012.39
5.4.220.0100.04912.39
5.4.210.0100.04812.39
5.4.200.0100.05212.39
5.4.190.0140.07712.38
5.4.180.0100.05112.38
5.4.170.0220.07512.39
5.4.160.0170.04312.39
5.4.150.0080.04812.39
5.4.140.0090.04912.07
5.4.130.0190.05412.05
5.4.120.0130.04212.01
5.4.110.0090.04812.01
5.4.100.0100.05112.01
5.4.90.0130.05312.02
5.4.80.0110.05512.01
5.4.70.0150.05712.01
5.4.60.0150.04512.00
5.4.50.0110.04812.00
5.4.40.0080.05012.00
5.4.30.0110.05311.99
5.4.20.0050.04112.00
5.4.10.0090.04612.00
5.4.00.0080.05611.48
5.3.290.0060.03812.80
5.3.280.0150.05512.71
5.3.270.0140.05812.73
5.3.260.0080.06212.71
5.3.250.0100.05812.72
5.3.240.0230.07512.71
5.3.230.0110.05112.71
5.3.220.0100.05412.68
5.3.210.0070.06012.68
5.3.200.0120.05312.68
5.3.190.0090.05412.68
5.3.180.0080.05712.67
5.3.170.0100.06112.67
5.3.160.0170.05012.67
5.3.150.0100.06112.68
5.3.140.0110.06312.66
5.3.130.0080.06612.66
5.3.120.0140.06012.66
5.3.110.0080.06812.66
5.3.100.0100.06212.12
5.3.90.0120.06012.08
5.3.80.0090.07212.07
5.3.70.0120.09212.07
5.3.60.0130.05812.07
5.3.50.0100.05112.00
5.3.40.0090.06312.00
5.3.30.0150.06011.95
5.3.20.0300.10311.72
5.3.10.0160.10311.70
5.3.00.0270.09111.68
5.2.170.0090.0799.19
5.2.160.0100.0459.18
5.2.150.0100.0439.18
5.2.140.0500.0619.18
5.2.130.0360.0589.14
5.2.120.0290.0449.14
5.2.110.0210.0469.14
5.2.100.0160.0639.14
5.2.90.0390.0489.14
5.2.80.0190.0939.14
5.2.70.0170.0529.14
5.2.60.0190.0449.09
5.2.50.0100.0499.06
5.2.40.0110.0459.04
5.2.30.0180.0499.02
5.2.20.0100.0379.00
5.2.10.0080.0338.93
5.2.00.0090.0498.79
5.1.60.0100.0318.07
5.1.50.0090.0258.07
5.1.40.0090.0408.04
5.1.30.0080.0468.40
5.1.20.0160.0398.41
5.1.10.0090.0408.14
5.1.00.0120.0398.14
5.0.50.0100.0236.62
5.0.40.0080.0296.48
5.0.30.0090.0416.29
5.0.20.0110.0486.26
5.0.10.0070.0266.25
5.0.00.0020.0446.23
4.4.90.0030.0244.78
4.4.80.0020.0364.76
4.4.70.0080.0184.75
4.4.60.0090.0214.75
4.4.50.0060.0224.77
4.4.40.0100.0374.71
4.4.30.0060.0214.76
4.4.20.0100.0204.84
4.4.10.0360.0184.85
4.4.00.0160.0304.76
4.3.110.0050.0214.67
4.3.100.0030.0264.66
4.3.90.0030.0264.63
4.3.80.0030.0334.58
4.3.70.0070.0154.63
4.3.60.0040.0214.63
4.3.50.0040.0204.62
4.3.40.0040.0324.54
4.3.30.0030.0223.28
4.3.20.0020.0223.25
4.3.10.0010.0203.23
4.3.00.0030.01312.58

preferences:
46.41 ms | 401 KiB | 5 Q