3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<STR This is <a href="http://foo.com">This is #foo</a>. Simple #html-stuff text <a href=\"http://foobar.com#baz\">#simple</a> <span class="simple">simple #simple text text</span> STR; echo preg_replace('/(?!<a[^<>]*>[^#]+)#(\b[-_\w]+\b)(?![^<]*<\/a>)/', '<a href="/tags/$1">#$1</a>', $str);

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.0110.01118.56
8.3.50.0160.00721.98
8.3.40.0140.00018.96
8.3.30.0090.00618.79
8.3.20.0080.00018.89
8.3.10.0040.00420.72
8.3.00.0030.00617.63
8.2.180.0120.00616.75
8.2.170.0090.00622.96
8.2.160.0100.00322.21
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0030.01626.16
8.2.120.0050.00219.89
8.2.110.0100.00021.03
8.2.100.0030.01017.84
8.2.90.0030.00619.30
8.2.80.0090.00021.19
8.2.70.0030.00517.75
8.2.60.0000.00718.04
8.2.50.0040.00418.07
8.2.40.0050.00320.01
8.2.30.0040.00419.96
8.2.20.0070.00317.75
8.2.10.0000.00717.83
8.2.00.0070.00317.74
8.1.280.0070.00725.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00920.81
8.1.230.0100.00020.81
8.1.220.0050.00317.74
8.1.210.0000.00818.91
8.1.200.0060.00317.35
8.1.190.0000.00817.38
8.1.180.0080.00018.10
8.1.170.0040.00418.76
8.1.160.0070.00018.91
8.1.150.0020.00518.78
8.1.140.0000.00717.46
8.1.130.0070.00017.47
8.1.120.0040.00317.56
8.1.110.0060.00317.54
8.1.100.0000.00717.50
8.1.90.0080.00017.55
8.1.80.0030.00317.44
8.1.70.0000.00617.43
8.1.60.0050.00317.68
8.1.50.0000.00717.57
8.1.40.0080.00017.64
8.1.30.0000.00817.66
8.1.20.0000.00817.64
8.1.10.0040.00417.71
8.1.00.0030.00717.52
8.0.300.0040.00419.98
8.0.290.0070.00017.00
8.0.280.0080.00018.48
8.0.270.0080.00017.19
8.0.260.0030.00316.91
8.0.250.0070.00017.22
8.0.240.0000.00917.11
8.0.230.0090.00217.14
8.0.220.0030.00316.98
8.0.210.0070.00016.95
8.0.200.0030.00317.10
8.0.190.0000.00816.98
8.0.180.0000.00816.98
8.0.170.0000.00917.03
8.0.160.0040.00417.13
8.0.150.0040.00417.03
8.0.140.0070.00317.02
8.0.130.0050.00013.43
8.0.120.0060.00316.95
8.0.110.0040.00417.04
8.0.100.0000.00716.89
8.0.90.0050.00217.10
8.0.80.0120.00317.04
8.0.70.0050.00217.03
8.0.60.0080.00017.00
8.0.50.0070.00016.91
8.0.30.0090.00917.41
8.0.20.0120.01217.40
8.0.10.0070.00017.15
8.0.00.0060.01316.96
7.4.330.0030.00314.93
7.4.320.0000.00716.73
7.4.300.0030.00316.78
7.4.290.0030.00316.76
7.4.280.0040.00416.72
7.4.270.0070.00016.75
7.4.260.0030.00313.46
7.4.250.0030.00616.67
7.4.240.0070.00016.66
7.4.230.0040.00416.86
7.4.220.0100.00716.62
7.4.210.0050.01116.65
7.4.200.0050.00216.67
7.4.190.0030.00316.62
7.4.160.0100.01016.80
7.4.150.0150.00917.40
7.4.140.0120.00717.28
7.4.130.0110.00916.59
7.4.120.0050.01316.74
7.4.110.0110.00716.54
7.4.100.0060.01216.81
7.4.90.0070.01016.78
7.4.80.0030.01419.03
7.4.70.0100.00716.63
7.4.60.0080.00716.70
7.4.50.0030.00316.57
7.4.40.0130.00322.27
7.4.30.0090.00916.64
7.4.00.0000.01215.34
7.3.330.0050.00013.03
7.3.320.0000.00513.32
7.3.310.0000.00716.45
7.3.300.0030.00316.40
7.3.290.0070.00716.42
7.3.280.0090.00516.40
7.3.270.0140.00417.40
7.3.260.0130.00618.24
7.3.250.0130.01116.45
7.3.240.0160.00616.39
7.3.230.0110.01116.64
7.3.210.0180.00016.63
7.3.200.0130.01019.39
7.3.190.0150.00316.32
7.3.180.0090.00616.51
7.3.170.0030.01316.48
7.3.160.0080.00816.71
7.3.120.0100.00714.61
7.2.330.0110.01116.60
7.2.320.0170.00716.64
7.2.310.0090.01516.78
7.2.300.0100.00716.77
7.2.290.0140.00416.48
7.2.110.0260.00616.84
7.2.00.0070.01019.32
7.1.100.0100.00818.45
7.1.70.0000.01517.00
7.1.60.0130.01019.40
7.1.50.0060.01216.94
7.1.00.0130.06022.33
7.0.200.0190.00815.06
7.0.140.0070.06722.15
7.0.60.0070.05320.02
7.0.50.0000.04717.71
7.0.40.0130.07717.76
7.0.30.0170.06717.71
7.0.20.0170.07017.70
7.0.10.0030.04317.75
7.0.00.0030.07717.70
5.6.280.0030.07321.12
5.6.210.0100.03720.50
5.6.200.0100.08018.13
5.6.190.0030.04318.21
5.6.180.0070.08718.21
5.6.170.0070.06018.23
5.6.160.0000.06318.21
5.6.150.0130.07318.11
5.6.140.0130.07718.18
5.6.130.0130.07318.08
5.6.120.0070.07718.21
5.6.110.0000.05318.23
5.6.100.0100.05718.09
5.6.90.0130.08018.10
5.6.80.0030.04717.46
5.6.70.0100.07317.58
5.6.60.0070.08017.49
5.6.50.0100.06017.57
5.6.40.0070.07017.54
5.6.30.0100.06717.54
5.6.20.0100.07317.45
5.6.10.0170.06317.46
5.6.00.0000.08717.46
5.5.350.0230.06320.34
5.5.340.0030.04317.91
5.5.330.0130.07318.02
5.5.320.0070.06717.98
5.5.310.0130.03318.01
5.5.300.0030.07717.98
5.5.290.0030.05017.99
5.5.280.0100.04018.02
5.5.270.0030.07717.96
5.5.260.0070.08017.89
5.5.250.0100.07317.83
5.5.240.0100.05717.34
5.5.230.0070.06317.34
5.5.220.0030.08017.39
5.5.210.0100.07017.30
5.5.200.0070.08017.24
5.5.190.0070.06317.30
5.5.180.0070.08017.27
5.5.160.0000.06717.33
5.5.150.0070.04017.29
5.5.140.0070.07017.23
5.5.130.0030.08017.36
5.5.120.0030.08017.36
5.5.110.0070.05717.25
5.5.100.0100.04717.22
5.5.90.0100.05017.23
5.5.80.0000.07017.23
5.5.70.0030.08317.20
5.5.60.0100.07017.15
5.5.50.0070.05017.16
5.5.40.0030.04717.13
5.5.30.0000.04017.24
5.5.20.0000.04317.19
5.5.10.0070.06017.24
5.5.00.0130.06717.22
5.4.450.0100.06319.36
5.4.440.0000.04319.44
5.4.430.0170.06319.43
5.4.420.0070.05319.36
5.4.410.0070.06319.18
5.4.400.0070.07719.10
5.4.390.0030.06718.98
5.4.380.0170.06719.03
5.4.370.0030.06318.89
5.4.360.0130.07018.89
5.4.350.0030.05319.04
5.4.340.0030.07718.89
5.4.320.0100.05318.91
5.4.310.0070.05319.07
5.4.300.0070.07318.98
5.4.290.0070.04318.96
5.4.280.0200.06019.13
5.4.270.0070.08019.00
5.4.260.0130.03318.82
5.4.250.0100.08019.11
5.4.240.0100.04718.96
5.4.230.0070.06019.00
5.4.220.0070.08319.09
5.4.210.0100.07318.88
5.4.200.0100.07318.95
5.4.190.0070.03718.96
5.4.180.0100.05018.94
5.4.170.0100.07719.08
5.4.160.0030.07318.97
5.4.150.0100.04719.02
5.4.140.0070.04016.29
5.4.130.0070.07716.45
5.4.120.0070.07316.44
5.4.110.0070.07316.39
5.4.100.0100.07316.30
5.4.90.0070.04016.52
5.4.80.0100.06716.34
5.4.70.0100.05016.28
5.4.60.0030.04316.34
5.4.50.0000.08316.25
5.4.40.0070.06716.27
5.4.30.0030.05716.38
5.4.20.0070.07716.30
5.4.10.0070.06016.36
5.4.00.0130.06015.70
5.3.290.0130.07314.63
5.3.280.0030.05014.55
5.3.270.0130.06014.55
5.3.260.0100.06714.55
5.3.250.0070.07314.59
5.3.240.0000.06014.43
5.3.230.0070.08014.38
5.3.220.0000.06314.50
5.3.210.0070.07714.39
5.3.200.0100.06314.49
5.3.190.0030.06014.49
5.3.180.0100.03714.38
5.3.170.0170.07314.50
5.3.160.0030.06314.39
5.3.150.0070.04714.51
5.3.140.0130.05014.43
5.3.130.0100.08014.51
5.3.120.0030.07714.46
5.3.110.0070.08014.32
5.3.100.0030.04313.97
5.3.90.0130.05314.00
5.3.80.0030.08313.93
5.3.70.0030.07313.92
5.3.60.0070.04713.93
5.3.50.0030.07013.93
5.3.40.0030.04714.02
5.3.30.0130.06313.86
5.3.20.0070.07713.65
5.3.10.0070.06313.60
5.3.00.0070.03313.64
5.2.170.0130.04711.11
5.2.160.0100.06010.96
5.2.150.0070.06011.12
5.2.140.0000.07011.12
5.2.130.0030.04311.07
5.2.120.0100.05011.13
5.2.110.0030.03011.10
5.2.100.0100.02310.92
5.2.90.0000.03311.04
5.2.80.0070.06311.07
5.2.70.0030.06311.05
5.2.60.0100.04010.88
5.2.50.0000.04710.98
5.2.40.0070.05710.94
5.2.30.0000.04711.12
5.2.20.0070.06010.92
5.2.10.0030.06310.90
5.2.00.0070.05710.57
5.1.60.0070.0509.97
5.1.50.0070.0509.98
5.1.40.0070.0409.97
5.1.30.0030.05310.19
5.1.20.0070.05310.39
5.1.10.0070.04710.04
5.1.00.0030.05710.06
5.0.50.0030.0238.54
5.0.40.0000.0438.25
5.0.30.0030.0378.06
5.0.20.0030.0438.03
5.0.10.0000.0278.20
5.0.00.0030.0508.19
4.4.90.0030.0307.75
4.4.80.0030.0337.75
4.4.70.0000.0377.75
4.4.60.0070.0307.75
4.4.50.0030.0307.75
4.4.40.0030.0537.75
4.4.30.0030.0377.75
4.4.20.0070.0177.75
4.4.10.0030.0337.75
4.4.00.0000.0507.75
4.3.110.0030.0307.75
4.3.100.0100.0237.75
4.3.90.0030.0277.75
4.3.80.0000.0507.75
4.3.70.0030.0377.75
4.3.60.0000.0377.75
4.3.50.0100.0307.75
4.3.40.0000.0507.75
4.3.30.0000.0337.75
4.3.20.0000.0237.75
4.3.10.0000.0207.75
4.3.00.0070.0307.75

preferences:
59.88 ms | 401 KiB | 5 Q