3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new DOMDocument(); $dom->loadHtml(' Hello World have a look at <a href="www.laptops.com/apple">Apple Laptops</a>. For more ino go to <a href="www.apple.com">Apple.com</a> or to <a href="www.appleblog.com">Appleblog.com</a> ', LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $xpath = new DOMXPath($dom); foreach ($xpath->query("//a") as $link) { $href = $link->getAttribute('href'); // link has a # in it, so replace with the links title if (strpos($href, 'www.laptops.com') === false) { $link->setAttribute("rel", "nofollow noopener"); } } echo $dom->saveHTML();

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.70.0160.00017.13
8.3.60.0160.00618.78
8.3.50.0180.00418.42
8.3.40.0150.00019.21
8.3.30.0070.00719.14
8.3.20.0040.00419.44
8.3.10.0080.00024.02
8.3.00.0080.00023.89
8.2.190.0110.00716.88
8.2.180.0120.00618.75
8.2.170.0090.00622.96
8.2.160.0110.00719.36
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0100.00321.20
8.2.110.0060.00320.89
8.2.100.0120.00018.16
8.2.90.0090.00017.88
8.2.80.0000.00819.11
8.2.70.0080.00017.88
8.2.60.0040.00418.41
8.2.50.0080.00018.07
8.2.40.0000.00818.54
8.2.30.0040.00418.54
8.2.20.0000.00718.41
8.2.10.0050.00218.48
8.2.00.0070.00019.91
8.1.280.0180.00725.92
8.1.270.0090.00022.41
8.1.260.0040.00426.35
8.1.250.0100.00328.09
8.1.240.0030.00619.37
8.1.230.0100.00318.07
8.1.220.0040.00418.02
8.1.210.0050.00318.77
8.1.200.0060.00317.72
8.1.190.0030.00517.60
8.1.180.0060.00318.10
8.1.170.0000.00719.13
8.1.160.0050.00219.28
8.1.150.0050.00219.24
8.1.140.0000.00718.06
8.1.130.0080.00019.29
8.1.120.0040.00417.77
8.1.110.0080.00017.86
8.1.100.0040.00417.89
8.1.90.0000.00717.91
8.1.80.0080.00017.79
8.1.70.0040.00417.86
8.1.60.0050.00317.89
8.1.50.0060.00317.84
8.1.40.0030.00517.93
8.1.30.0050.00318.10
8.1.20.0040.00417.89
8.1.10.0050.00317.99
8.1.00.0020.00517.80
8.0.300.0080.00018.77
8.0.290.0000.00717.13
8.0.280.0030.00518.74
8.0.270.0060.00317.15
8.0.260.0060.00617.55
8.0.250.0110.00017.39
8.0.240.0060.00317.28
8.0.230.0050.00317.32
8.0.220.0100.00017.22
8.0.210.0080.00017.17
8.0.200.0000.00717.33
8.0.190.0040.00417.25
8.0.180.0040.00417.25
8.0.170.0050.00317.34
8.0.160.0000.00717.32
8.0.150.0000.00717.20
8.0.140.0000.00717.13
8.0.130.0040.00413.75
8.0.120.0040.00417.28
8.0.110.0050.00217.27
8.0.100.0040.00417.31
8.0.90.0060.00317.36
8.0.80.0100.00617.28
8.0.70.0040.00417.35
8.0.60.0000.00817.08
8.0.50.0040.00417.02
8.0.30.0130.00517.43
8.0.20.0130.00617.56
8.0.10.0000.00717.49
8.0.00.0080.01017.40
7.4.330.0000.00515.55
7.4.320.0030.00317.03
7.4.300.0000.00616.88
7.4.290.0050.00316.92
7.4.280.0050.00316.91
7.4.270.0000.00716.82
7.4.260.0040.00416.81
7.4.250.0030.00316.73
7.4.240.0000.00716.76
7.4.230.0000.00716.91
7.4.220.0070.00016.70
7.4.210.0080.00916.96
7.4.200.0040.00416.96
7.4.160.0070.00816.88
7.4.140.0140.00517.86
7.4.130.0130.00416.90
7.4.120.0100.01116.86
7.4.110.0040.01116.84
7.4.100.0090.00916.99
7.4.90.0130.00716.68
7.4.80.0090.00919.39
7.4.70.0160.00317.01
7.4.60.0070.01316.71
7.4.50.0100.00716.58
7.4.40.0060.01216.68
7.4.00.0060.00814.94
7.3.330.0050.00013.30
7.3.320.0030.00313.43
7.3.310.0070.00016.59
7.3.300.0000.00716.64
7.3.290.0000.00716.42
7.3.280.0040.01116.59
7.3.260.0100.01016.72
7.3.240.0120.00616.73
7.3.230.0070.01116.73
7.3.210.0080.01016.70
7.3.200.0060.01017.01
7.3.190.0040.01116.71
7.3.180.0060.01316.53
7.3.170.0060.00916.77
7.3.160.0080.00816.82
7.3.120.0040.01615.00
7.3.110.0130.00614.73
7.3.100.0070.01014.79
7.3.90.0090.01214.61
7.3.80.0100.00714.77
7.3.70.0060.00914.92
7.3.60.0030.00614.89
7.3.50.0060.00614.85
7.3.40.0060.00914.81
7.3.30.0000.01614.70
7.3.20.0000.01616.81
7.3.10.0090.00416.81
7.3.00.0060.00616.79
7.2.330.0100.01417.15
7.2.320.0130.00616.85
7.2.310.0110.00816.74
7.2.300.0070.01016.91
7.2.290.0030.01717.05
7.2.250.0100.01015.15
7.2.240.0030.01315.32
7.2.230.0120.00615.28
7.2.220.0030.00715.27
7.2.210.0030.01614.95
7.2.200.0090.00615.17
7.2.190.0000.01415.15
7.2.180.0060.00615.07
7.2.170.0060.00615.28
7.2.130.0030.01017.09
7.2.120.0120.00016.89
7.2.110.0090.00617.15
7.2.100.0030.00717.30
7.2.90.0070.00316.89
7.2.80.0060.00916.97
7.2.70.0050.01317.03
7.2.60.0060.00717.23
7.2.50.0080.01117.10
7.2.40.0090.00717.05
7.2.30.0060.00817.05
7.2.20.0060.00917.03
7.2.10.0050.01016.96
7.2.00.0070.00917.10
7.1.330.0070.00715.74
7.1.320.0070.01015.92
7.1.310.0000.01316.07
7.1.300.0040.01216.14
7.1.290.0120.00315.93
7.1.280.0040.00815.80
7.1.270.0150.00015.81
7.1.260.0040.00815.93
7.1.250.0000.01515.86
7.1.200.0110.00415.76
7.1.170.0030.01015.69
7.1.160.0100.00315.97
7.1.150.0150.00315.98
7.1.140.0110.00515.95
7.1.130.0070.01115.76
7.1.120.0100.00315.83
7.1.110.0070.01016.11
7.1.100.0140.00315.86
7.1.90.0060.00915.89
7.1.80.0060.00615.76
7.1.70.0050.00815.86
7.1.60.0340.00433.88
7.1.50.0220.01233.89
7.1.40.0320.01233.71
7.1.30.0300.01233.82
7.1.20.0230.01333.81
7.1.10.0060.01015.68
7.1.00.0090.00815.80

preferences:
45.23 ms | 401 KiB | 5 Q