3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urlContent = '<li><span><a href="https://site1.com">site1.com</a> : Description 1</span></li> <li><span><a href="https://site2.com">site2.com</a> : Description 2</span></li> <li><span><a href="https://site3.com">site3.com</a> : Description 3</span></li> <li><span><a href="https://site4.com">site4.com</a> : Description 4</span></li>'; $dom = new DOMDocument(); @$dom->loadHTML($urlContent); $xpath = new DOMXPath($dom); $lis = $xpath->evaluate("/html/body/li"); //$li = document.getElementsByTagName("li"); foreach ($lis as $li) { $a = $xpath->evaluate("span/a", $li)->item(0); $url = $a->getAttribute('href'); var_dump($url, trim($a->nextSibling->nodeValue, ' :')); }

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.5.00.0120.00920.45
8.4.150.0030.00014.05
8.4.140.0120.00917.98
8.4.130.0130.00818.20
8.4.120.0150.00522.90
8.4.110.0110.00819.28
8.4.100.0130.00719.05
8.4.90.0090.01124.63
8.4.80.0040.00419.13
8.4.70.0040.00418.44
8.4.60.0150.00519.26
8.4.50.0100.00920.78
8.4.40.0130.00619.75
8.4.30.0100.01022.61
8.4.20.0160.00418.11
8.4.10.0030.00619.88
8.3.280.0150.00618.74
8.3.270.0110.00916.81
8.3.260.0040.00416.93
8.3.250.0130.00619.22
8.3.240.0110.00817.13
8.3.230.0120.00816.85
8.3.220.0060.00219.34
8.3.210.0120.00718.84
8.3.200.0060.00317.03
8.3.190.0080.00617.53
8.3.180.0090.01116.87
8.3.170.0130.00617.54
8.3.160.0180.00019.28
8.3.150.0060.00317.15
8.3.140.0110.00716.91
8.3.130.0050.00318.61
8.3.120.0030.00520.96
8.3.110.0080.00016.94
8.3.100.0120.00024.06
8.3.90.0030.00626.77
8.3.80.0060.00319.36
8.3.70.0140.00716.87
8.3.60.0120.00918.68
8.3.50.0120.00823.78
8.3.40.0090.00619.06
8.3.30.0150.00018.88
8.3.20.0030.00624.18
8.3.10.0080.00024.66
8.3.00.0050.00326.16
8.2.290.0120.00821.08
8.2.280.0140.00618.81
8.2.270.0040.01517.80
8.2.260.0080.00818.66
8.2.250.0050.00317.30
8.2.240.0030.00617.37
8.2.230.0000.00820.94
8.2.220.0040.00437.54
8.2.210.0030.00626.77
8.2.200.0000.00918.88
8.2.190.0120.00316.93
8.2.180.0110.00625.92
8.2.170.0120.00319.18
8.2.160.0100.00722.96
8.2.150.0080.00025.66
8.2.140.0070.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00426.35
8.2.110.0040.00420.85
8.2.100.0090.00918.09
8.2.90.0000.01018.00
8.2.80.0060.00618.98
8.2.70.0050.00517.88
8.2.60.0040.00418.18
8.2.50.0030.00618.05
8.2.40.0030.00618.53
8.2.30.0030.00618.42
8.2.20.0000.00718.45
8.2.10.0050.00319.62
8.2.00.0040.00419.66
8.1.330.0110.01016.44
8.1.320.0090.01116.24
8.1.310.0080.00819.06
8.1.300.0160.00018.30
8.1.290.0090.00030.84
8.1.280.0040.01125.92
8.1.270.0060.00323.99
8.1.260.0090.00028.09
8.1.250.0000.00728.09
8.1.240.0060.00322.13
8.1.230.0060.00618.20
8.1.220.0050.00317.92
8.1.210.0050.00518.77
8.1.200.0050.00517.73
8.1.190.0050.00317.60
8.1.180.0000.00818.10
8.1.170.0000.00918.91
8.1.160.0070.00419.33
8.1.150.0070.00019.23
8.1.140.0000.00719.32
8.1.130.0000.00820.46
8.1.120.0000.00817.89
8.1.110.0030.00617.85
8.1.100.0040.00417.70
8.1.90.0060.00317.91
8.1.80.0080.00017.82
8.1.70.0030.00317.86
8.1.60.0000.00917.95
8.1.50.0030.00517.96
8.1.40.0000.00717.91
8.1.30.0040.00417.96
8.1.20.0030.00617.89
8.1.10.0060.00318.00
8.1.00.0030.00517.88
8.0.300.0070.00418.77
8.0.290.0050.00317.00
8.0.280.0040.00418.84
8.0.270.0070.00018.37
8.0.260.0000.00718.86
8.0.250.0030.00517.38
8.0.240.0040.00417.24
8.0.230.0000.00717.35
8.0.220.0050.00217.11
8.0.210.0030.00317.27
8.0.200.0040.00417.23
8.0.190.0000.00817.39
8.0.180.0050.00317.36
8.0.170.0030.00617.30
8.0.160.0000.00717.34
8.0.150.0000.00717.11
8.0.140.0060.00317.15
8.0.130.0050.00013.80
8.0.120.0030.00517.11
8.0.110.0000.00817.28
8.0.100.0040.00417.29
8.0.90.0040.00417.23
8.0.80.0090.00817.21
8.0.70.0040.00417.32
8.0.60.0050.00217.31
8.0.50.0000.00817.23
8.0.30.0060.01217.41
8.0.20.0150.01217.45
8.0.10.0030.00517.20
8.0.00.0220.00517.86
7.4.330.0020.00215.55
7.4.320.0030.00316.84
7.4.300.0000.00716.98
7.4.290.0030.00616.86
7.4.280.0000.00816.98
7.4.270.0070.00016.95
7.4.260.0030.00313.54
7.4.250.0000.00716.97
7.4.240.0090.00017.06
7.4.230.0040.00417.07
7.4.220.0040.00416.88
7.4.210.0050.00916.93
7.4.200.0040.00416.96
7.4.140.0140.01317.86
7.4.130.0070.01417.86
7.4.120.0240.00317.86
7.4.110.0270.02817.86
7.4.100.0230.00317.86
7.4.90.0150.01117.86
7.4.80.0120.00817.86
7.4.70.0100.01017.86
7.4.60.0200.00017.86
7.4.50.0030.01517.86
7.4.40.0130.00717.86
7.4.30.0140.01217.86
7.4.20.0100.01017.86
7.4.10.0120.01117.86
7.4.00.0080.01117.86
7.3.330.0030.00616.69
7.3.320.0000.00513.37
7.3.310.0030.00316.59
7.3.300.0040.00416.75
7.3.290.0100.00516.60
7.3.260.0160.00917.86
7.3.250.0150.00917.86
7.3.240.0140.01417.86
7.3.230.0150.00617.86
7.3.220.0130.00717.86
7.3.210.0030.02217.86
7.3.200.0120.00917.86
7.3.190.0130.01317.86
7.3.180.0110.00717.86
7.3.170.0030.01517.86
7.3.160.0110.00917.86
7.3.150.0190.00317.86
7.3.140.0120.00717.86
7.3.130.0150.00617.86
7.3.120.0130.00617.86
7.3.110.0060.01217.86
7.3.100.0220.01417.86
7.3.90.0110.00817.86
7.3.80.0170.00317.86
7.3.70.0040.01617.86
7.3.60.0170.01217.86
7.3.50.0090.01317.86
7.3.40.0110.00917.86
7.3.30.0000.02017.86
7.3.20.0130.00717.86
7.3.10.0090.01017.86
7.3.00.0110.00817.86

preferences:
31.16 ms | 403 KiB | 5 Q