3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = array( '#tag', 'text #tag text', 'text #tag', 'text#tag', ); $res = preg_replace('/\B#(\S{1,24}+)/u', '#<$1>' , $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.40.0150.00618.96
8.3.30.0090.00619.01
8.3.20.0090.00018.99
8.3.10.0040.00419.32
8.3.00.0040.00423.66
8.2.170.0070.01422.96
8.2.160.0100.00320.47
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0000.00819.91
8.2.110.0070.00420.55
8.2.100.0060.00617.97
8.2.90.0050.00319.21
8.2.80.0040.00417.97
8.2.70.0080.00017.75
8.2.60.0110.00017.80
8.2.50.0000.00818.07
8.2.40.0030.00617.97
8.2.30.0030.00521.37
8.2.20.0040.00417.82
8.2.10.0040.00417.83
8.2.00.0050.00317.78
8.1.270.0000.00823.99
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0090.00022.59
8.1.230.0030.00920.95
8.1.220.0050.00318.77
8.1.210.0000.00818.86
8.1.200.0060.00317.48
8.1.190.0080.00017.53
8.1.180.0000.00818.10
8.1.170.0040.00418.84
8.1.160.0040.00418.84
8.1.150.0040.00418.71
8.1.140.0080.00017.60
8.1.130.0000.00717.98
8.1.120.0000.00717.48
8.1.110.0050.00317.57
8.1.100.0040.00417.53
8.1.90.0000.00717.47
8.1.80.0040.00417.56
8.1.70.0030.00317.50
8.1.60.0120.00017.73
8.1.50.0050.00317.62
8.1.40.0060.00317.44
8.1.30.0070.00017.68
8.1.20.0050.00317.81
8.1.10.0040.00417.54
8.1.00.0000.00717.58
8.0.300.0000.00719.89
8.0.290.0040.00417.30
8.0.280.0070.00018.50
8.0.270.0030.00317.18
8.0.260.0100.00017.04
8.0.250.0000.00817.21
8.0.240.0030.00617.05
8.0.230.0000.00717.14
8.0.220.0040.00417.11
8.0.210.0030.00317.10
8.0.200.0000.00617.13
8.0.190.0000.00717.12
8.0.180.0040.00417.07
8.0.170.0000.00917.09
8.0.160.0030.00417.02
8.0.150.0000.00716.83
8.0.140.0040.00416.86
8.0.130.0050.00013.43
8.0.120.0070.00017.06
8.0.110.0070.00016.97
8.0.100.0000.00717.15
8.0.90.0070.00017.16
8.0.80.0140.00417.16
8.0.70.0000.00817.06
8.0.60.0080.00017.05
8.0.50.0040.00417.05
8.0.30.0070.01217.35
8.0.20.0100.00717.40
8.0.10.0030.00617.20
8.0.00.0120.01017.03
7.4.330.0030.00314.96
7.4.320.0050.00316.86
7.4.300.0030.00316.76
7.4.290.0030.00316.86
7.4.280.0000.00716.79
7.4.270.0000.00816.79
7.4.260.0030.00313.43
7.4.250.0060.00316.58
7.4.240.0000.00816.75
7.4.230.0030.00316.66
7.4.220.0090.00816.84
7.4.210.0080.00816.82
7.4.200.0000.00716.68
7.4.190.0070.00016.84
7.4.160.0120.00416.41
7.4.150.0090.00917.40
7.4.140.0090.00817.86
7.4.130.0100.00716.59
7.4.120.0090.00916.74
7.4.110.0170.00316.61
7.4.100.0040.01516.79
7.4.90.0090.01316.84
7.4.80.0090.00919.39
7.4.70.0100.00716.73
7.4.60.0150.00316.82
7.4.50.0080.00016.52
7.4.40.0080.00822.52
7.4.30.0060.01216.76
7.4.00.0030.01215.04
7.3.330.0020.00213.06
7.3.320.0050.00013.13
7.3.310.0030.00316.43
7.3.300.0000.00716.37
7.3.290.0030.01216.36
7.3.280.0050.01116.35
7.3.270.0060.00917.40
7.3.260.0150.00318.24
7.3.250.0120.00716.56
7.3.240.0060.01016.50
7.3.230.0030.01516.73
7.3.210.0130.00316.64
7.3.200.0040.01319.39
7.3.190.0090.00916.69
7.3.180.0090.00616.55
7.3.170.0110.00716.43
7.3.160.0070.01016.72
7.3.120.0060.00914.85
7.2.330.0130.00416.84
7.2.320.0140.00316.78
7.2.310.0100.00916.77
7.2.300.0070.01016.66
7.2.290.0140.00316.67
7.2.00.0070.00719.62
7.1.100.0030.01017.92
7.1.70.0040.00417.15
7.1.60.0070.01419.40
7.1.50.0040.01117.11
7.1.00.0030.06322.49
7.0.200.0030.00616.63
7.0.140.0130.06022.16
7.0.90.0100.04319.95
7.0.80.0100.08019.86
7.0.70.0570.06019.84
7.0.60.0400.04719.95
7.0.50.0430.08720.27
7.0.40.0070.04320.03
7.0.30.0130.08720.08
7.0.20.0070.04020.14
7.0.10.0030.04320.08
7.0.00.0130.08020.10
5.6.280.0030.07320.77
5.6.230.0030.06020.66
5.6.220.0070.07720.48
5.6.210.0070.04020.55
5.6.200.0200.09021.00
5.6.190.0100.05321.16
5.6.180.0100.08021.02
5.6.170.0170.04320.98
5.6.160.0100.05021.01
5.6.150.0100.08021.10
5.6.140.0130.07321.04
5.6.130.0030.06321.12
5.6.120.0100.07021.07
5.6.110.0070.08021.00
5.6.100.0100.04721.00
5.6.90.0130.05021.08
5.6.80.0070.05720.41
5.6.70.0100.07720.40
5.6.60.0030.04020.38
5.6.50.0130.08020.55
5.6.40.0070.06720.41
5.6.30.0100.03720.45
5.6.20.0170.07020.35
5.6.10.0170.06020.37
5.6.00.0130.07720.45
5.5.370.0130.07020.41
5.5.360.0100.04020.36
5.5.350.0000.05720.42
5.5.340.0100.06320.72
5.5.330.0100.06720.73
5.5.320.0100.05020.79
5.5.310.0130.07020.83
5.5.300.0100.07720.92
5.5.290.0030.08320.76
5.5.280.0200.07720.80
5.5.270.0000.09020.72
5.5.260.0000.04720.90
5.5.250.0000.06020.59
5.5.240.0130.07320.20
5.5.230.0100.04020.12
5.5.220.0100.03320.12
5.5.210.0070.03720.25
5.5.200.0030.05020.26
5.5.190.0070.07720.20
5.5.180.0070.04020.10
5.5.160.0070.04020.07
5.5.150.0000.04720.23
5.5.140.0030.04020.21
5.5.130.0070.04720.14
5.5.120.0100.07020.07
5.5.110.0070.07320.20
5.5.100.0100.05720.03
5.5.90.0070.04720.05
5.5.80.0070.04320.15
5.5.70.0070.04720.11
5.5.60.0030.07719.95
5.5.50.0030.04320.07
5.5.40.0100.03320.02
5.5.30.0030.07320.15
5.5.20.0030.06720.08
5.5.10.0030.07720.07
5.5.00.0030.08319.96
5.4.450.0170.04019.41
5.4.440.0000.08019.48
5.4.430.0100.05719.46
5.4.420.0070.03719.46
5.4.410.0030.05719.07
5.4.400.0030.05719.09
5.4.390.0100.04718.85
5.4.380.0030.03719.05
5.4.370.0100.05719.09
5.4.360.0100.07319.20
5.4.350.0100.06718.95
5.4.340.0100.08019.09
5.4.320.0130.03319.18
5.4.310.0030.04018.84
5.4.300.0030.04019.04
5.4.290.0100.07319.04
5.4.280.0030.04019.02
5.4.270.0030.04019.14
5.4.260.0070.07319.20
5.4.250.0070.07018.93
5.4.240.0000.05019.08
5.4.230.0000.08018.94
5.4.220.0130.07318.86
5.4.210.0070.07719.13
5.4.200.0100.05019.22
5.4.190.0130.06019.12
5.4.180.0030.07719.11
5.4.170.0070.08319.01
5.4.160.0000.07318.92
5.4.150.0100.07719.11
5.4.140.0100.07016.19
5.4.130.0100.07016.45
5.4.120.0000.05316.41
5.4.110.0030.07716.50
5.4.100.0130.06716.41
5.4.90.0170.06316.49
5.4.80.0170.04016.49
5.4.70.0030.05016.49
5.4.60.0270.05716.41
5.4.50.0000.08016.30
5.4.40.0130.06316.35
5.4.30.0030.06016.40
5.4.20.0070.06316.36
5.4.10.0100.07316.48
5.4.00.0170.06315.63
5.3.290.0070.07314.59
5.3.280.0100.07714.64
5.3.270.0130.07314.52
5.3.260.0000.07714.70
5.3.250.0100.03714.71
5.3.240.0170.06314.55
5.3.230.0030.07314.55
5.3.220.0100.06714.59
5.3.210.0100.07314.70
5.3.200.0130.04014.57
5.3.190.0070.07714.56
5.3.180.0070.05014.55
5.3.170.0130.06714.61
5.3.160.0070.05314.51
5.3.150.0000.05014.66
5.3.140.0100.06714.52
5.3.130.0070.07714.47
5.3.120.0130.06714.46
5.3.110.0030.04014.56
5.3.100.0030.06713.95
5.3.90.0070.04314.06
5.3.80.0130.06714.04
5.3.70.0030.05714.09
5.3.60.0030.05314.13
5.3.50.0030.04013.96
5.3.40.0100.07314.07
5.3.30.0070.07713.80
5.3.20.0070.04013.64
5.3.10.0100.06713.79
5.3.00.0030.06013.71
5.2.170.0100.06013.64
5.2.160.0030.06313.64
5.2.150.0030.05313.64
5.2.140.0030.06713.64
5.2.130.0070.06313.64
5.2.120.0030.06313.64
5.2.110.0100.05013.64
5.2.100.0030.06013.64
5.2.90.0130.04713.64
5.2.80.0030.07013.64
5.2.70.0030.05713.64
5.2.60.0030.06313.64
5.2.50.0030.06013.64
5.2.40.0070.04313.64
5.2.30.0030.06013.64
5.2.20.0000.04713.64
5.2.10.0000.03713.64
5.2.00.0070.06013.64
5.1.60.0000.05013.64
5.1.50.0000.04713.64
5.1.40.0030.05713.64
5.1.30.0030.04013.64
5.1.20.0000.05313.64
5.1.10.0030.04013.64
5.1.00.0130.03313.64
5.0.50.0070.04013.64
5.0.40.0070.04013.64
5.0.30.0100.06013.64
5.0.20.0030.04313.64
5.0.10.0070.04313.64
5.0.00.0070.03713.64
4.4.90.0000.04013.64
4.4.80.0000.03013.64
4.4.70.0000.03013.64
4.4.60.0000.03713.64
4.4.50.0030.03313.64
4.4.40.0070.04013.64
4.4.30.0000.03713.64
4.4.20.0000.02713.64
4.4.10.0070.03313.64
4.4.00.0070.04013.64
4.3.110.0000.03713.64
4.3.100.0070.02713.64
4.3.90.0000.03013.64
4.3.80.0100.04313.64
4.3.70.0030.03013.64
4.3.60.0070.03013.64
4.3.50.0030.03013.64
4.3.40.0000.03013.64
4.3.30.0030.03713.64
4.3.20.0000.02013.64
4.3.10.0070.03313.64
4.3.00.0000.03713.64

preferences:
42.07 ms | 400 KiB | 5 Q