3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = array( '#tag', 'text #tag text', 'text #tag', 'text#tag', ); $res = preg_replace('/(?<=^|\s)#\S{1,24}+(?=$|\s)/u', '$0' , $var); print_r($res); echo preg_replace('/\B#(\S{1,24}+)/u', '<$0>' , '#111 тапинамбур#222 #333 #444');

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.0090.01216.50
8.3.50.0210.01022.14
8.3.40.0110.00418.89
8.3.30.0070.00719.18
8.3.20.0000.00720.30
8.3.10.0040.00423.48
8.3.00.0040.00420.52
8.2.180.0120.01216.38
8.2.170.0090.00622.96
8.2.160.0130.00722.24
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0050.00220.02
8.2.110.0060.00320.35
8.2.100.0120.00017.97
8.2.90.0030.00519.18
8.2.80.0000.00917.97
8.2.70.0030.00617.50
8.2.60.0080.00318.04
8.2.50.0050.00318.07
8.2.40.0080.00019.31
8.2.30.0000.00818.20
8.2.20.0080.00017.96
8.2.10.0040.00419.80
8.2.00.0030.00517.89
8.1.280.0120.00625.92
8.1.270.0030.00623.88
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0050.00322.25
8.1.230.0070.00418.93
8.1.220.0000.00817.79
8.1.210.0060.00318.77
8.1.200.0000.01017.35
8.1.190.0030.00617.54
8.1.180.0080.00018.10
8.1.170.0090.00018.77
8.1.160.0070.00021.94
8.1.150.0050.00318.80
8.1.140.0040.00417.63
8.1.130.0030.00317.92
8.1.120.0000.00717.49
8.1.110.0040.00717.54
8.1.100.0030.00317.40
8.1.90.0000.00717.59
8.1.80.0050.00317.53
8.1.70.0030.00317.42
8.1.60.0030.00617.58
8.1.50.0000.00817.63
8.1.40.0030.00517.62
8.1.30.0000.00817.67
8.1.20.0040.00417.75
8.1.10.0000.00817.66
8.1.00.0040.00417.58
8.0.300.0040.00418.77
8.0.290.0030.00716.88
8.0.280.0040.00418.47
8.0.270.0000.00717.36
8.0.260.0030.00316.91
8.0.250.0030.00317.13
8.0.240.0000.00717.27
8.0.230.0070.00017.08
8.0.220.0030.00316.96
8.0.210.0050.00317.02
8.0.200.0060.00017.16
8.0.190.0040.00417.08
8.0.180.0000.00717.11
8.0.170.0040.00417.05
8.0.160.0050.00317.08
8.0.150.0050.00217.05
8.0.140.0040.00416.97
8.0.130.0000.00613.54
8.0.120.0040.00417.13
8.0.110.0050.00217.14
8.0.100.0050.00317.00
8.0.90.0000.00817.18
8.0.80.0060.00917.07
8.0.70.0020.00517.11
8.0.60.0000.00817.09
8.0.50.0040.00417.12
8.0.30.0130.00817.16
8.0.20.0090.01017.42
8.0.10.0040.00416.98
8.0.00.0050.01416.94
7.4.330.0050.00015.20
7.4.320.0030.00316.65
7.4.300.0060.00016.71
7.4.290.0040.00416.79
7.4.280.0030.00316.76
7.4.270.0000.00716.68
7.4.260.0040.00416.80
7.4.250.0080.00016.68
7.4.240.0020.00516.73
7.4.230.0030.00516.86
7.4.220.0180.00716.71
7.4.210.0060.00916.75
7.4.200.0000.00716.70
7.4.190.0040.00316.85
7.4.160.0060.01016.55
7.4.150.0100.00717.40
7.4.140.0080.01117.86
7.4.130.0070.01616.54
7.4.120.0090.00816.65
7.4.110.0130.00316.46
7.4.100.0070.01116.73
7.4.90.0030.01616.54
7.4.80.0070.01416.81
7.4.70.0040.01616.74
7.4.60.0030.01316.61
7.4.50.0000.00416.53
7.4.40.0030.01422.77
7.4.30.0060.00916.80
7.4.00.0070.01115.18
7.3.330.0060.00013.27
7.3.320.0060.00013.20
7.3.310.0060.00016.29
7.3.300.0000.00716.35
7.3.290.0130.00716.42
7.3.280.0060.01116.40
7.3.270.0080.00817.40
7.3.260.0130.00716.43
7.3.250.0130.00716.36
7.3.240.0030.01416.62
7.3.230.0100.00616.39
7.3.210.0140.00716.54
7.3.200.0160.00619.39
7.3.190.0070.01016.45
7.3.180.0130.00316.51
7.3.170.0060.01016.66
7.3.160.0050.01116.76
7.3.120.0060.00914.92
7.3.10.0100.01016.50
7.3.00.0110.00616.59
7.2.330.0070.01016.64
7.2.320.0110.01316.81
7.2.310.0070.01116.75
7.2.300.0090.00916.54
7.2.290.0070.01616.70
7.2.130.0080.00817.06
7.2.120.0060.01017.01
7.2.110.0060.00616.74
7.2.100.0090.00516.69
7.2.90.0070.00816.60
7.2.80.0100.00216.61
7.2.70.0070.00816.97
7.2.60.0090.00816.98
7.2.50.0090.00917.06
7.2.40.0100.00816.98
7.2.30.0080.01016.94
7.2.20.0090.00716.92
7.2.10.0120.00317.03
7.2.00.0130.00617.53
7.1.250.0040.01115.56
7.1.240.0070.00715.93
7.1.230.0060.00715.69
7.1.220.0040.00915.74
7.1.210.0090.00615.74
7.1.200.0040.00715.61
7.1.190.0050.00715.70
7.1.180.0090.00515.84
7.1.170.0050.00915.64
7.1.160.0060.01015.65
7.1.150.0050.00815.72
7.1.140.0080.00515.79
7.1.130.0080.00615.88
7.1.120.0150.00315.90
7.1.110.0120.00215.78
7.1.100.0050.00916.51
7.1.90.0100.00715.91
7.1.80.0080.00615.72
7.1.70.0050.00816.21
7.1.60.0060.01416.93
7.1.50.0100.00916.18
7.1.40.0050.01315.66
7.1.30.0490.01115.80
7.1.20.0110.00815.92
7.1.10.0050.01015.74
7.1.00.0090.02918.07
7.0.330.0090.00615.49
7.0.320.0070.00715.05
7.0.310.0100.00315.41
7.0.300.0090.00815.30
7.0.290.0060.00815.36
7.0.280.0100.00515.24
7.0.270.0090.00615.37
7.0.260.0110.00315.46
7.0.250.0080.00615.38
7.0.240.0110.00415.36
7.0.230.0050.00815.36
7.0.220.0060.00815.42
7.0.210.0090.00515.40
7.0.200.0060.00815.95
7.0.190.0080.00815.49
7.0.180.0080.00815.46
7.0.170.0070.00615.40
7.0.160.0070.00615.59
7.0.150.0090.00515.37
7.0.140.0090.02717.63
7.0.130.0030.01215.42
7.0.120.0080.00915.42
7.0.110.0060.01015.58
7.0.100.0100.00415.50
7.0.90.0100.00515.45
7.0.80.0080.00815.21
7.0.70.0090.00315.57
7.0.60.0090.02916.93
7.0.50.0080.02816.16
7.0.40.0100.03115.72
7.0.30.0110.03415.73
7.0.20.0140.02915.70
7.0.10.0090.01415.86
7.0.00.0050.03715.84
5.6.380.0090.00314.36
5.6.370.0050.00614.48
5.6.360.0090.00613.90
5.6.350.0070.00914.36
5.6.340.0100.00414.26
5.6.330.0060.00814.46
5.6.320.0050.01514.28
5.6.310.0080.01014.51
5.6.300.0070.00614.44
5.6.290.0060.00914.40
5.6.280.0050.03016.67
5.6.270.0020.01214.04
5.6.260.0060.00614.12
5.6.250.0040.00914.33
5.6.240.0080.00614.05
5.6.230.0100.00514.20
5.6.220.0070.01014.13
5.6.210.0080.03216.29
5.6.200.0030.02115.62
5.6.190.0080.03216.16
5.6.180.0150.02116.25
5.6.170.0140.02416.39
5.6.160.0060.03516.20
5.6.150.0070.03315.38
5.6.140.0110.02115.51
5.6.130.0060.03015.50
5.6.120.0050.02216.53
5.6.110.0180.02616.45
5.6.100.0120.03116.49
5.6.90.0060.02716.37
5.6.80.0120.02316.38
5.6.70.0110.00614.16
5.6.60.0070.00914.23
5.6.50.0120.00714.21
5.6.40.0100.00914.10
5.6.30.0070.00814.15
5.6.20.0060.00614.22
5.6.10.0090.00414.24
5.6.00.0180.00313.96
5.5.380.0090.00511.21
5.5.370.0070.00611.21
5.5.360.0050.00511.13
5.5.350.1330.01714.25
5.5.340.0020.02213.33
5.5.330.0100.02814.12
5.5.320.0030.01814.26
5.5.310.0110.02614.20
5.5.300.0040.03013.54
5.5.290.0040.02313.50
5.5.280.0030.03214.31
5.5.270.0090.02614.28
5.5.260.0040.03014.41
5.5.250.0050.03014.38
5.5.240.0080.02814.08
5.5.230.0110.00910.90
5.5.220.0050.00811.13
5.5.210.0090.00610.76
5.5.200.0070.00610.99
5.5.190.0110.00710.88
5.5.180.0100.00410.82
5.5.170.0090.00612.53
5.5.160.0150.00710.77
5.5.150.0160.00410.74
5.5.140.0160.00210.66
5.5.130.0040.00810.84
5.5.120.0140.00510.97
5.5.110.0070.00910.99
5.5.100.0080.00810.91
5.5.90.0130.00611.02
5.5.80.0110.00611.01
5.5.70.0090.00511.17
5.5.60.0150.00711.11
5.5.50.0140.00211.05
5.5.40.0110.00611.01
5.5.30.0070.00811.05
5.5.20.0050.00911.16
5.5.10.0090.00610.99
5.5.00.0020.00810.83
5.4.450.0130.01914.00
5.4.440.0380.02313.77
5.4.430.0610.01213.94
5.4.420.0320.02313.83
5.4.410.0530.01713.79
5.4.400.0290.02013.75
5.4.390.0540.01913.58
5.4.380.0210.02013.37
5.4.370.0300.02213.57
5.4.360.0180.02513.48
5.4.350.0190.02413.49
5.4.340.0240.02213.54
5.4.330.0220.00410.92
5.4.320.0150.01511.37
5.4.310.0220.01611.49
5.4.300.0230.01711.43
5.4.290.0080.02111.52
5.4.280.0180.01911.44
5.4.270.0130.01911.33
5.4.260.0220.01811.51
5.4.250.0190.02111.38
5.4.240.0180.01811.54
5.4.230.0140.01811.34
5.4.220.0140.01511.55
5.4.210.0180.01511.48
5.4.200.0130.01811.35
5.4.190.0200.01811.40
5.4.180.0160.01611.26
5.4.170.0200.01411.41
5.4.160.0110.01911.31
5.4.150.0190.01511.27
5.4.140.0140.01511.27
5.4.130.0150.01311.33
5.4.120.0180.01711.30
5.4.110.0180.01411.25
5.4.100.0190.01511.42
5.4.90.0110.01511.39
5.4.80.0120.01711.36
5.4.70.0190.01411.22
5.4.60.0200.01411.29
5.4.50.0130.01311.29
5.4.40.0150.01311.45
5.4.30.0180.01211.28
5.4.20.0130.01311.33
5.4.10.0170.01611.37
5.4.00.0120.01611.12
5.3.290.0160.01711.33
5.3.280.0110.01811.22
5.3.270.0200.01111.36
5.3.260.0150.01911.34
5.3.250.0130.01911.32
5.3.240.0200.01611.14
5.3.230.0130.01611.24
5.3.220.0150.01811.21
5.3.210.0190.01711.25
5.3.200.0160.01411.15
5.3.190.0190.01511.24
5.3.180.0150.01711.29
5.3.170.0070.01611.25
5.3.160.0060.01611.20
5.3.150.0110.01511.21
5.3.140.0170.01411.20
5.3.130.0170.01211.18
5.3.120.0170.01611.28
5.3.110.0150.01811.22
5.3.100.0090.01810.97
5.3.90.0100.01711.08
5.3.80.0140.01510.90
5.3.70.0120.01710.95
5.3.60.0120.01811.04
5.3.50.0100.01910.93
5.3.40.0110.01410.89
5.3.30.0050.01910.97
5.3.20.0090.01810.79
5.3.10.0110.01210.76
5.3.00.0120.01410.65
5.2.170.0090.0139.43
5.2.160.0040.0149.36
5.2.150.0040.0159.38
5.2.140.0040.0149.29
5.2.130.0080.0139.35
5.2.120.0100.0099.44
5.2.110.0020.0159.22
5.2.100.0050.0119.40
5.2.90.0050.0139.39
5.2.80.0060.0129.29
5.2.70.0070.0139.18
5.2.60.0070.0119.11
5.2.50.0110.0139.18
5.2.40.0050.0139.31
5.2.30.0060.0139.24
5.2.20.0060.0129.12
5.2.10.0090.0109.09
5.2.00.0080.0119.08
5.1.60.0060.0128.43
5.1.50.0040.0138.43
5.1.40.0080.0118.42
5.1.30.0050.0128.55
5.1.20.0070.0138.55
5.1.10.0120.0108.46
5.1.00.0070.0128.45
5.0.50.0070.0107.95
5.0.40.0060.0127.90
5.0.30.0080.0127.84
5.0.20.0070.0087.83
5.0.10.0070.0097.82
5.0.00.0090.0107.82
4.4.90.0040.0087.34
4.4.80.0060.0077.33
4.4.70.0030.0097.33
4.4.60.0040.0067.33
4.4.50.0050.0077.34
4.4.40.0050.0107.32
4.4.30.0050.0077.33
4.4.20.0010.0087.36
4.4.10.0050.0087.36
4.4.00.0050.0097.33
4.3.110.0030.0077.30
4.3.100.0040.0077.30
4.3.90.0030.0087.29
4.3.80.0040.0107.27
4.3.70.0040.0077.29
4.3.60.0030.0107.29
4.3.50.0060.0057.29
4.3.40.0040.0117.26
4.3.30.0010.0096.84
4.3.20.0050.0086.83
4.3.10.0030.0086.82
4.3.00.0070.00710.13

preferences:
41.49 ms | 401 KiB | 5 Q