3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tweet = "hello world #dontremoveme foobar http://example.com/#dontremoveme #remove #removeme #removeüäüö"; #$res = preg_replace("/ #\p{L}+\b(?!\s+\p{L})/u", '', $tweet); $res = preg_replace("/ #\w+/u", '', $tweet); echo $res,"\n";

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.01016.88
8.3.50.0060.01322.24
8.3.40.0090.00618.95
8.3.30.0070.00719.08
8.3.20.0030.00620.29
8.3.10.0000.00821.96
8.3.00.0080.00019.63
8.2.180.0150.00618.51
8.2.170.0060.00922.96
8.2.160.0070.00720.27
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0090.00019.82
8.2.110.0060.00320.43
8.2.100.0100.00318.10
8.2.90.0040.00418.03
8.2.80.0000.00917.97
8.2.70.0080.00417.61
8.2.60.0060.00317.93
8.2.50.0000.00918.07
8.2.40.0030.00618.14
8.2.30.0000.00718.14
8.2.20.0000.00817.82
8.2.10.0080.00018.12
8.2.00.0040.00417.93
8.1.280.0200.00025.92
8.1.270.0090.00020.73
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.14
8.1.230.0040.00720.89
8.1.220.0080.00017.78
8.1.210.0040.00418.94
8.1.200.0060.00317.47
8.1.190.0050.00317.10
8.1.180.0040.00418.10
8.1.170.0040.00420.46
8.1.160.0040.00421.90
8.1.150.0000.00718.96
8.1.140.0000.00717.59
8.1.130.0040.00417.93
8.1.120.0040.00617.53
8.1.110.0000.00717.59
8.1.100.0030.00417.48
8.1.90.0040.00417.50
8.1.80.0040.00417.51
8.1.70.0000.00717.42
8.1.60.0040.00417.64
8.1.50.0000.00817.52
8.1.40.0050.00317.62
8.1.30.0040.00417.72
8.1.20.0000.00817.74
8.1.10.0080.00017.61
8.1.00.0000.00817.47
8.0.300.0040.00420.08
8.0.290.0040.00416.88
8.0.280.0040.00418.32
8.0.270.0070.00017.27
8.0.260.0000.00617.28
8.0.250.0070.00017.06
8.0.240.0060.00017.04
8.0.230.0040.00417.02
8.0.220.0030.00316.93
8.0.210.0000.00717.06
8.0.200.0030.00317.07
8.0.190.0000.00717.11
8.0.180.0030.00316.93
8.0.170.0060.00316.97
8.0.160.0050.00216.94
8.0.150.0000.00716.93
8.0.140.0040.00417.05
8.0.130.0030.00313.41
8.0.120.0100.00017.03
8.0.110.0070.00017.09
8.0.100.0000.00717.03
8.0.90.0000.00716.97
8.0.80.0060.01217.06
8.0.70.0040.00416.88
8.0.60.0080.00016.97
8.0.50.0030.00516.90
8.0.30.0080.01217.52
8.0.20.0080.01017.40
8.0.10.0040.00417.13
8.0.00.0120.00517.06
7.4.330.0050.00015.05
7.4.320.0040.00416.60
7.4.300.0070.00016.80
7.4.290.0000.00716.72
7.4.280.0000.00716.77
7.4.270.0030.00316.79
7.4.260.0000.00616.82
7.4.250.0000.00716.63
7.4.240.0010.00716.82
7.4.230.0000.00716.81
7.4.220.0120.00616.66
7.4.210.0100.00716.74
7.4.200.0050.00216.56
7.4.160.0000.01616.69
7.4.150.0070.01017.40
7.4.140.0120.00617.86
7.4.130.0090.00816.70
7.4.120.0090.00716.74
7.4.110.0090.00916.75
7.4.100.0170.02016.71
7.4.90.0090.00916.78
7.4.80.0120.00619.39
7.4.70.0060.01016.62
7.4.60.0070.01016.72
7.4.50.0000.00816.43
7.4.40.0060.01016.51
7.4.30.0160.00716.83
7.4.00.0000.01814.97
7.3.330.0050.00013.23
7.3.320.0090.00413.25
7.3.310.0000.00716.40
7.3.300.0030.00316.42
7.3.290.0000.00716.22
7.3.280.0100.00616.41
7.3.270.0070.01717.40
7.3.260.0080.00816.66
7.3.250.0090.01016.51
7.3.240.0070.01016.80
7.3.230.0120.00616.68
7.3.210.0110.00616.52
7.3.200.0060.01519.39
7.3.190.0060.00916.54
7.3.180.0080.00816.35
7.3.170.0070.01016.44
7.3.160.0120.00316.51
7.2.330.0140.01216.47
7.2.320.0120.00616.78
7.2.310.0030.01416.59
7.2.300.0090.01216.82
7.2.290.0080.01516.70
7.2.00.0030.01319.10
7.1.100.0030.01018.16
7.1.70.0090.00317.39
7.1.60.0060.01619.50
7.1.50.0060.01917.05
7.1.00.0070.06722.45
7.0.200.0000.00716.79
7.0.140.0030.07022.08
7.0.120.0000.04322.00
7.0.110.0030.04022.09
7.0.100.0000.03722.03
7.0.90.0000.06722.00
7.0.80.0030.03321.97
7.0.70.0000.04322.11
7.0.60.0100.07321.91
7.0.50.0100.03322.07
7.0.40.0070.03720.13
7.0.30.0070.03719.93
7.0.20.0030.04020.10
7.0.10.0070.03319.99
7.0.00.0000.04319.93
5.6.280.0000.07720.77
5.6.270.0000.03721.02
5.6.260.0000.04321.07
5.6.250.0000.03720.78
5.6.240.0000.03720.96
5.6.230.0070.05321.02
5.6.220.0000.04020.95
5.6.210.0070.07720.82
5.6.200.0030.08720.77
5.6.190.0030.03320.77
5.6.180.0000.06320.88
5.6.170.0000.04020.92
5.6.160.0100.03720.79
5.6.150.0030.07020.94
5.6.140.0030.05020.76
5.6.130.0000.04320.86
5.6.120.0030.05720.96
5.6.110.0030.05320.72
5.6.100.0030.06320.96
5.6.90.0070.05021.00
5.6.80.0000.04020.31
5.6.70.0070.04020.34
5.6.60.0000.04320.32
5.6.50.0030.04020.07
5.6.40.0100.07320.13
5.6.30.0070.03720.35
5.6.20.0100.04020.28
5.6.10.0030.03720.09
5.6.00.0070.03320.37
5.5.380.0000.03317.52
5.5.370.0070.05017.50
5.5.360.0000.04017.52
5.5.350.0000.04717.52
5.5.340.0000.04017.88
5.5.330.0000.04017.89
5.5.320.0030.04017.87
5.5.310.0000.04017.82
5.5.300.0100.03017.86
5.5.290.0000.04017.89
5.5.280.0030.06318.25
5.5.270.0000.08717.97
5.5.260.0030.03718.15
5.5.250.0000.04018.06
5.5.240.0000.03717.15
5.5.230.0070.05717.36
5.5.220.0100.04317.46
5.5.210.0000.04017.54
5.5.200.0000.05717.52
5.5.190.0000.04017.33
5.5.180.0000.05717.45
5.5.160.0030.06317.51
5.5.150.0000.07717.59
5.5.140.0030.04017.60
5.5.130.0000.03717.11
5.5.120.0000.08017.36
5.5.110.0030.06017.21
5.5.100.0000.05017.41
5.5.90.0000.04017.50
5.5.80.0000.05017.23
5.5.70.0030.08017.01
5.5.60.0070.04017.13
5.5.50.0070.06017.10
5.5.40.0070.07017.25
5.5.30.0070.05017.25
5.5.20.0030.03717.26
5.5.10.0000.04317.36
5.5.00.0070.05017.21
5.4.450.0030.04319.35
5.4.440.0070.03019.43
5.4.430.0000.08019.21
5.4.420.0070.06319.20
5.4.410.0030.06019.22
5.4.400.0000.04019.13
5.4.390.0070.06718.88
5.4.380.0000.04019.19
5.4.370.0030.04719.06
5.4.360.0030.03718.99
5.4.350.0000.04318.96
5.4.340.0070.06319.12
5.4.320.0030.06318.95
5.4.310.0030.08319.05
5.4.300.0100.03718.97
5.4.290.0000.06718.90
5.4.280.0070.05318.89
5.4.270.0030.03318.96
5.4.260.0100.07718.95
5.4.250.0000.03719.02
5.4.240.0030.06719.06
5.4.230.0070.05019.21
5.4.220.0070.06719.07
5.4.210.0030.03318.87
5.4.200.0000.07018.89
5.4.190.0030.03318.88
5.4.180.0030.04718.93
5.4.170.0070.06018.92
5.4.160.0070.07319.02
5.4.150.0000.04018.90
5.4.140.0030.03716.38
5.4.130.0000.03716.30
5.4.120.0000.06016.16
5.4.110.0030.05716.46
5.4.100.0030.03716.43
5.4.90.0070.03016.46
5.4.80.0000.05016.46
5.4.70.0030.06016.06
5.4.60.0030.06716.32
5.4.50.0000.03316.43
5.4.40.0000.06316.16
5.4.30.0000.05016.20
5.4.20.0100.04316.36
5.4.10.0070.04316.42
5.4.00.0030.06015.58
5.3.290.0030.07014.65
5.3.280.0030.03314.60
5.3.270.0000.07714.45
5.3.260.0000.04014.48
5.3.250.0000.04714.47
5.3.240.0070.06314.42
5.3.230.0000.03714.38
5.3.220.0000.07314.50
5.3.210.0000.07014.57
5.3.200.0070.06314.38
5.3.190.0000.03714.63
5.3.180.0030.03314.41
5.3.170.0030.03314.43
5.3.160.0030.06314.47
5.3.150.0000.04014.42
5.3.140.0030.03314.43
5.3.130.0030.05314.33
5.3.120.0030.07314.63
5.3.110.0070.05314.38
5.3.100.0070.05014.03
5.3.90.0000.07313.84
5.3.80.0000.07713.89
5.3.70.0070.06314.08
5.3.60.0070.06713.88
5.3.50.0030.06313.96
5.3.40.0030.04313.84
5.3.30.0000.05713.92
5.3.20.0000.05013.77
5.3.10.0030.07313.57
5.3.00.0000.04013.56
5.2.170.0070.04311.03
5.2.160.0070.02011.30
5.2.150.0030.06011.04
5.2.140.0030.06011.21
5.2.130.0070.02311.11
5.2.120.0000.03710.88
5.2.110.0000.03011.02
5.2.100.0000.05311.04
5.2.90.0030.05711.16
5.2.80.0030.04010.97
5.2.70.0000.05311.03
5.2.60.0070.02311.04
5.2.50.0030.02711.04
5.2.40.0030.06010.99
5.2.30.0070.03010.91
5.2.20.0000.05710.89
5.2.10.0000.04010.88
5.2.00.0000.02710.84
5.1.60.0000.0509.93
5.1.50.0030.0209.91
5.1.40.0000.0239.74
5.1.30.0030.05710.55
5.1.20.0070.02010.41
5.1.10.0000.03310.03
5.1.00.0070.0339.88
5.0.50.0000.0339.68
5.0.40.0000.0239.68
5.0.30.0000.0679.68
5.0.20.0000.0439.68
5.0.10.0030.0179.68
5.0.00.0030.0439.68
4.4.90.0000.0239.68
4.4.80.0030.0239.68
4.4.70.0000.0339.68
4.4.60.0000.0139.68
4.4.50.0000.0379.68
4.4.40.0000.0239.68
4.4.30.0070.0279.68
4.4.20.0000.0209.68
4.4.10.0030.0209.68
4.4.00.0000.0539.68
4.3.110.0070.0279.68
4.3.100.0000.0139.68
4.3.90.0000.0139.68
4.3.80.0000.0479.68
4.3.70.0000.0139.68
4.3.60.0000.0139.68
4.3.50.0000.0139.68
4.3.40.0000.0309.68
4.3.30.0000.0379.68
4.3.20.0000.0309.68
4.3.10.0030.0179.68
4.3.00.0000.0309.68

preferences:
46.03 ms | 401 KiB | 5 Q