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> <span>foo #simple"onclick="alert('hi')" another 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.0150.00418.31
8.3.50.0110.00822.05
8.3.40.0070.00719.06
8.3.30.0090.00618.97
8.3.20.0050.00219.07
8.3.10.0000.00820.79
8.3.00.0030.00617.62
8.2.180.0160.00616.75
8.2.170.0120.00322.96
8.2.160.0100.00322.24
8.2.150.0000.00824.18
8.2.140.0090.00024.66
8.2.130.0090.00026.16
8.2.120.0040.00419.89
8.2.110.0060.00322.20
8.2.100.0090.00317.84
8.2.90.0030.00619.05
8.2.80.0050.00318.04
8.2.70.0000.00817.59
8.2.60.0060.00317.93
8.2.50.0040.00418.07
8.2.40.0000.00718.22
8.2.30.0070.00019.82
8.2.20.0000.00717.86
8.2.10.0040.00417.79
8.2.00.0080.00017.70
8.1.280.0150.00025.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00622.41
8.1.230.0060.00620.90
8.1.220.0050.00318.77
8.1.210.0050.00318.92
8.1.200.0030.00617.35
8.1.190.0000.00717.40
8.1.180.0090.00018.10
8.1.170.0050.00318.83
8.1.160.0040.00418.86
8.1.150.0050.00218.74
8.1.140.0040.00417.46
8.1.130.0030.00317.90
8.1.120.0000.00717.61
8.1.110.0000.00817.46
8.1.100.0040.00317.52
8.1.90.0000.00717.46
8.1.80.0000.00717.48
8.1.70.0040.00417.49
8.1.60.0030.00617.57
8.1.50.0000.00817.52
8.1.40.0040.00417.61
8.1.30.0050.00217.80
8.1.20.0050.00317.63
8.1.10.0040.00417.72
8.1.00.0090.00017.66
8.0.300.0040.00419.89
8.0.290.0000.00716.88
8.0.280.0000.00718.54
8.0.270.0000.00817.35
8.0.260.0000.00718.87
8.0.250.0000.00717.17
8.0.240.0040.00717.19
8.0.230.0040.00417.11
8.0.220.0060.00017.04
8.0.210.0050.00317.09
8.0.200.0000.00616.96
8.0.190.0040.00417.11
8.0.180.0040.00417.05
8.0.170.0040.00416.91
8.0.160.0000.00717.02
8.0.150.0040.00417.04
8.0.140.0030.00717.00
8.0.130.0000.00513.45
8.0.120.0000.00816.96
8.0.110.0030.00316.93
8.0.100.0000.00717.08
8.0.90.0000.00717.04
8.0.80.0070.01517.05
8.0.70.0000.00816.85
8.0.60.0000.00717.06
8.0.50.0000.00817.07
8.0.30.0110.00817.15
8.0.20.0160.00617.49
8.0.10.0040.00417.24
8.0.00.0080.01416.98
7.4.330.0050.00015.00
7.4.320.0040.00416.72
7.4.300.0030.00316.80
7.4.290.0000.00616.76
7.4.280.0070.00016.59
7.4.270.0070.00016.67
7.4.260.0030.00313.34
7.4.250.0070.00016.51
7.4.240.0040.00416.69
7.4.230.0030.00316.86
7.4.220.0060.01216.75
7.4.210.0090.00916.77
7.4.200.0030.00516.80
7.4.190.0030.00316.92
7.4.160.0060.01016.58
7.4.150.0150.01517.40
7.4.140.0030.01317.86
7.4.130.0100.01016.70
7.4.120.0120.00616.68
7.4.110.0110.00716.69
7.4.100.0120.00616.70
7.4.90.0070.01016.70
7.4.80.0100.00719.03
7.4.70.0070.01016.70
7.4.60.0080.00916.73
7.4.50.0060.00316.71
7.4.40.0150.00022.27
7.4.30.0130.00316.57
7.4.00.0100.00715.21
7.3.330.0000.00513.26
7.3.320.0000.00513.17
7.3.310.0030.00316.20
7.3.300.0050.00216.24
7.3.290.0060.00616.37
7.3.280.0120.00716.34
7.3.270.0110.00617.40
7.3.260.0110.00718.24
7.3.250.0110.01316.60
7.3.240.0060.01016.54
7.3.230.0110.00616.49
7.3.210.0070.01016.73
7.3.200.0100.00719.39
7.3.190.0060.01216.47
7.3.180.0040.01116.54
7.3.170.0120.00916.47
7.3.160.0100.00616.71
7.3.120.0040.01115.07
7.2.330.0030.01416.68
7.2.320.0070.01116.65
7.2.310.0100.01016.50
7.2.300.0090.00916.53
7.2.290.0100.00616.57
7.2.80.0150.00616.55
7.2.60.0080.00616.82
7.2.50.0100.00717.00
7.1.200.0060.00315.94
7.1.70.0000.01717.23
7.1.60.0090.01519.40
7.1.50.0100.01016.82
7.1.00.0000.05022.39
7.0.200.0170.00014.65
7.0.140.0070.07022.21
7.0.60.0030.08719.78
7.0.50.0130.06717.82
7.0.40.0100.04017.91
7.0.30.0130.08017.72
7.0.20.0030.05317.73
7.0.10.0100.04317.90
7.0.00.0030.05317.66
5.6.280.0000.07721.09
5.6.210.0030.09320.50
5.6.200.0100.04718.15
5.6.190.0100.07318.18
5.6.180.0000.08718.20
5.6.170.0070.05718.22
5.6.160.0070.08018.15
5.6.150.0070.06718.12
5.6.140.0130.07018.07
5.6.130.0070.08318.11
5.6.120.0130.06018.18
5.6.110.0070.05018.20
5.6.100.0100.07718.11
5.6.90.0070.07718.16
5.6.80.0170.07317.54
5.6.70.0170.07017.51
5.6.60.0070.04717.49
5.6.50.0000.06317.49
5.6.40.0070.07717.45
5.6.30.0070.08017.48
5.6.20.0130.07317.54
5.6.10.0070.07317.57
5.6.00.0070.08017.57
5.5.350.0170.05320.32
5.5.340.0030.06317.98
5.5.330.0070.06718.01
5.5.320.0100.07017.96
5.5.310.0030.07017.96
5.5.300.0070.05318.02
5.5.290.0070.08317.97
5.5.280.0100.05017.93
5.5.270.0000.04317.97
5.5.260.0100.07017.97
5.5.250.0100.07317.70
5.5.240.0070.08017.36
5.5.230.0030.06717.34
5.5.220.0070.07717.36
5.5.210.0100.07717.29
5.5.200.0070.06317.33
5.5.190.0030.06717.33
5.5.180.0170.06317.27
5.5.160.0130.05717.31
5.5.150.0070.06317.36
5.5.140.0070.06317.32
5.5.130.0030.08317.22
5.5.120.0000.05317.29
5.5.110.0030.05717.32
5.5.100.0130.07717.26
5.5.90.0030.08017.23
5.5.80.0030.06717.13
5.5.70.0070.06017.15
5.5.60.0130.06317.15
5.5.50.0070.07317.22
5.5.40.0030.06717.15
5.5.30.0030.08017.16
5.5.20.0100.07317.12
5.5.10.0070.08017.18
5.5.00.0070.07017.24
5.4.450.0070.07719.36
5.4.440.0130.03019.42
5.4.430.0070.05719.29
5.4.420.0100.05719.30
5.4.410.0100.04319.27
5.4.400.0170.06718.97
5.4.390.0100.06019.00
5.4.380.0030.05319.07
5.4.370.0070.07318.99
5.4.360.0070.07018.99
5.4.350.0070.07719.03
5.4.340.0100.05018.98
5.4.320.0100.07318.89
5.4.310.0070.07019.03
5.4.300.0030.07718.96
5.4.290.0100.07019.13
5.4.280.0170.07019.20
5.4.270.0070.07718.82
5.4.260.0100.05718.95
5.4.250.0100.07318.98
5.4.240.0170.04018.96
5.4.230.0030.06319.11
5.4.220.0070.07718.96
5.4.210.0070.06019.03
5.4.200.0070.03718.97
5.4.190.0000.05719.06
5.4.180.0170.07018.93
5.4.170.0030.07319.08
5.4.160.0070.07319.10
5.4.150.0100.06718.96
5.4.140.0030.07716.25
5.4.130.0100.03316.25
5.4.120.0030.04716.26
5.4.110.0030.05316.25
5.4.100.0170.06016.28
5.4.90.0000.08316.29
5.4.80.0070.05716.32
5.4.70.0000.07716.26
5.4.60.0070.07316.50
5.4.50.0130.06716.33
5.4.40.0030.05016.32
5.4.30.0030.07716.34
5.4.20.0200.05716.26
5.4.10.0070.07016.24
5.4.00.0000.04015.89
5.3.290.0070.07014.63
5.3.280.0100.07714.57
5.3.270.0100.07714.56
5.3.260.0070.06314.46
5.3.250.0170.04014.54
5.3.240.0070.05314.57
5.3.230.0070.05714.57
5.3.220.0000.08014.55
5.3.210.0000.06014.53
5.3.200.0070.07014.52
5.3.190.0070.07314.42
5.3.180.0070.08014.52
5.3.170.0070.05314.55
5.3.160.0130.07014.41
5.3.150.0130.03314.38
5.3.140.0100.04714.49
5.3.130.0030.06314.50
5.3.120.0000.07314.46
5.3.110.0030.06014.37
5.3.100.0100.07313.86
5.3.90.0070.06713.84
5.3.80.0030.05013.86
5.3.70.0100.07013.95
5.3.60.0070.05313.75
5.3.50.0100.07313.90
5.3.40.0100.06313.93
5.3.30.0000.05013.67
5.3.20.0030.06713.68
5.3.10.0030.07313.61
5.3.00.0100.07013.48
5.2.170.0070.05011.11
5.2.160.0000.06711.12
5.2.150.0030.06710.92
5.2.140.0130.05010.97
5.2.130.0100.03011.09
5.2.120.0000.03311.04
5.2.110.0000.05711.02
5.2.100.0030.05710.91
5.2.90.0070.06311.12
5.2.80.0100.05711.07
5.2.70.0070.03711.09
5.2.60.0070.06310.99
5.2.50.0000.06310.95
5.2.40.0030.05710.89
5.2.30.0100.05310.80
5.2.20.0070.06310.93
5.2.10.0000.03310.91
5.2.00.0070.02710.76
5.1.60.0030.0309.99
5.1.50.0030.0509.98
5.1.40.0070.04710.06
5.1.30.0070.05710.48
5.1.20.0100.05010.39
5.1.10.0070.05310.02
5.1.00.0030.05710.06
5.0.50.0030.0508.54
5.0.40.0070.0438.40
5.0.30.0030.0538.26
5.0.20.0030.0238.23
5.0.10.0000.0478.20
5.0.00.0100.0478.23
4.4.90.0030.0307.72
4.4.80.0070.0307.72
4.4.70.0000.0277.72
4.4.60.0070.0277.72
4.4.50.0030.0177.72
4.4.40.0000.0537.72
4.4.30.0070.0177.72
4.4.20.0070.0207.72
4.4.10.0000.0277.72
4.4.00.0070.0507.72
4.3.110.0030.0207.72
4.3.100.0130.0137.72
4.3.90.0030.0177.72
4.3.80.0000.0277.72
4.3.70.0030.0137.72
4.3.60.0030.0137.72
4.3.50.0000.0277.72
4.3.40.0000.0237.72
4.3.30.0000.0137.72
4.3.20.0130.0077.72
4.3.10.0000.0177.72
4.3.00.0000.0137.72

preferences:
44.48 ms | 401 KiB | 5 Q