3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<< HTML <html> <base> <base href="http://example.com"/> </head> <body> <a href="//foo">foo</a> <a href="bar">bar</a> <a href="http://somewhere.else">somewhere else</a> <a href="tel://911">halp!</a> <a href="mailto:spam.pls@example.com">spam me</a> <a href="javascript:alert('hi')">say hi</a> </body> </html> HTML; $dom = new DOMDocument; $dom->loadHTML($html); $xpath = new DOMXPath($dom); $base = $xpath->evaluate('string(/html/head/base/@href)'); foreach ($xpath->evaluate('//a/@href') as $link) { if (strpos($link->nodeValue, 'http') === 0) { echo $link->nodeValue, PHP_EOL; } elseif (strpos($link->nodeValue, '//') === 0) { echo $base, substr($link->nodeValue, 1), PHP_EOL; } elseif (strpos($link->nodeValue, ':') === FALSE) { echo $base, '/', $link->nodeValue, PHP_EOL; } }

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.30.0100.00722.26
8.5.20.0070.01020.46
8.5.10.0120.00520.01
8.5.00.0080.01322.05
8.4.180.0070.01519.89
8.4.170.0060.00720.85
8.4.160.0110.01024.11
8.4.150.0060.00617.08
8.4.140.0100.01117.95
8.4.130.0120.00819.07
8.4.120.0100.01124.49
8.4.110.0140.00719.33
8.4.100.0100.01119.38
8.4.90.0130.00620.90
8.4.80.0100.01118.89
8.4.70.0070.01219.39
8.4.60.0050.00618.99
8.4.50.0140.00619.05
8.4.40.0130.00620.04
8.4.30.0100.01019.90
8.4.20.0040.00418.13
8.4.10.0090.00019.77
8.3.300.0120.00921.10
8.3.290.0100.01021.11
8.3.280.0090.01018.71
8.3.270.0050.00517.04
8.3.260.0060.00316.86
8.3.250.0150.00419.04
8.3.240.0070.00317.50
8.3.230.0140.00717.07
8.3.220.0110.00719.09
8.3.210.0110.00717.19
8.3.200.0050.00516.96
8.3.190.0110.00817.42
8.3.180.0030.00619.45
8.3.170.0080.00019.15
8.3.160.0000.01917.39
8.3.150.0150.00316.99
8.3.140.0060.00319.41
8.3.130.0080.00018.70
8.3.120.0060.00621.10
8.3.110.0060.01020.94
8.3.100.0030.00616.85
8.3.90.0070.00426.77
8.3.80.0060.00317.97
8.3.70.0090.00618.55
8.3.60.0150.00317.13
8.3.50.0120.00722.09
8.3.40.0120.00319.27
8.3.30.0070.01119.05
8.3.20.0030.00619.17
8.3.10.0040.00422.10
8.3.00.0060.00321.84
8.2.300.0140.00622.50
8.2.290.0080.01121.17
8.2.280.0110.00918.73
8.2.270.0060.01217.28
8.2.260.0090.00916.80
8.2.250.0170.00317.12
8.2.240.0080.00019.37
8.2.230.0090.00022.58
8.2.220.0000.00824.06
8.2.210.0110.00726.77
8.2.200.0090.00018.66
8.2.190.0070.00716.88
8.2.180.0120.00617.00
8.2.170.0150.00022.96
8.2.160.0110.00322.76
8.2.150.0090.00624.18
8.2.140.0040.00424.66
8.2.130.0060.00320.09
8.2.120.0150.00026.35
8.2.110.0000.00921.43
8.2.100.0100.00318.16
8.2.90.0060.00319.47
8.2.80.0030.00517.97
8.2.70.0040.00417.88
8.2.60.0080.00018.18
8.2.50.0050.00318.10
8.2.40.0080.00020.84
8.2.30.0050.00321.35
8.2.20.0050.00318.38
8.2.10.0000.00718.46
8.2.00.0040.00418.08
8.1.340.0140.00917.71
8.1.330.0110.01022.09
8.1.320.0120.00620.68
8.1.310.0070.00716.48
8.1.300.0090.00020.39
8.1.290.0060.00330.84
8.1.280.0110.01125.92
8.1.270.0160.00324.15
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0070.00319.65
8.1.230.0080.00421.15
8.1.220.0060.00318.03
8.1.210.0000.00818.77
8.1.200.0070.00317.60
8.1.190.0050.00319.34
8.1.180.0060.00318.10
8.1.170.0030.00519.14
8.1.160.0070.00022.37
8.1.150.0000.00919.23
8.1.140.0050.00319.94
8.1.130.0000.00718.02
8.1.120.0050.00217.83
8.1.110.0040.00417.85
8.1.100.0040.00417.75
8.1.90.0040.00317.85
8.1.80.0040.00417.76
8.1.70.0030.00317.87
8.1.60.0040.00417.96
8.1.50.0000.00817.74
8.1.40.0000.00817.80
8.1.30.0030.00617.96
8.1.20.0000.00817.99
8.1.10.0030.00617.84
8.1.00.0030.00517.83
8.0.300.0030.00818.77
8.0.290.0040.00417.13
8.0.280.0040.00418.88
8.0.270.0050.00317.54
8.0.260.0000.00717.53
8.0.250.0000.00817.25
8.0.240.0040.00417.37
8.0.230.0000.00817.20
8.0.220.0030.00317.18
8.0.210.0050.00317.24
8.0.200.0070.00017.23
8.0.190.0040.00417.31
8.0.180.0040.00417.34
8.0.170.0040.00417.34
8.0.160.0000.00717.28
8.0.150.0040.00317.26
8.0.140.0080.00017.13
8.0.130.0000.00613.68
8.0.120.0050.00317.26
8.0.110.0030.00517.34
8.0.100.0040.00417.34
8.0.90.0040.00417.13
8.0.80.0080.00817.32
8.0.70.0070.00017.32
8.0.60.0000.00717.45
8.0.50.0040.00417.33
8.0.30.0110.00717.32
8.0.20.0100.01017.50
8.0.10.0050.00317.46
8.0.00.0190.00017.17
7.4.330.0050.00015.55
7.4.320.0030.00316.94
7.4.300.0000.00716.89
7.4.290.0030.00316.77
7.4.280.0030.00616.85
7.4.270.0040.00416.94
7.4.260.0070.00016.95
7.4.250.0070.00016.79
7.4.240.0070.00016.92
7.4.230.0000.00816.82
7.4.220.0150.00617.04
7.4.210.0080.01216.91
7.4.200.0000.00816.98
7.4.160.0090.00616.99
7.4.150.0060.01217.40
7.4.140.0120.00517.86
7.4.130.0090.00816.94
7.4.120.0100.01116.91
7.4.110.0070.01016.93
7.4.100.0100.01316.87
7.4.90.0130.00616.84
7.4.80.0090.00819.39
7.4.70.0130.00816.99
7.4.60.0090.00616.70
7.4.50.0060.00616.47
7.4.40.0180.02816.96
7.4.30.0160.01016.76
7.4.00.0060.00915.34
7.3.330.0030.00313.54
7.3.320.0060.00013.59
7.3.310.0050.00216.75
7.3.300.0070.00016.70
7.3.290.0030.00316.64
7.3.280.0060.01116.66
7.3.270.0120.00617.40
7.3.260.0100.00816.81
7.3.250.0090.00816.71
7.3.240.0120.00816.92
7.3.230.0100.01016.84
7.3.210.0110.00716.75
7.3.200.0070.01016.55
7.3.190.0060.00816.92
7.3.180.0090.00716.74
7.3.170.0110.01116.76
7.3.160.0100.01316.87
7.3.10.0100.00616.85
7.3.00.0030.00616.77
7.2.330.0100.01316.83
7.2.320.0100.00716.78
7.2.310.0100.00717.18
7.2.300.0110.00816.83
7.2.290.0070.01016.81
7.2.130.0000.00917.03
7.2.120.0090.00617.25
7.2.110.0110.00416.96
7.2.100.0040.00716.96
7.2.90.0080.00616.88
7.2.80.0040.01116.99
7.2.70.0030.01016.98
7.2.60.0080.00517.16
7.2.50.0070.00316.93
7.2.40.0070.00317.24
7.2.30.0060.01016.91
7.2.20.0040.00817.18
7.2.10.0100.00317.02
7.2.00.0070.00718.27
7.1.250.0060.00615.88
7.1.200.0070.00715.82
7.1.70.0030.00517.13
7.1.60.0040.00717.32
7.1.00.0070.07322.45
7.0.200.0360.01014.78
7.0.120.0300.04722.14
7.0.110.0170.05022.20
7.0.100.0070.05722.30
7.0.90.0130.05322.14
7.0.80.0070.06022.28
7.0.70.0130.05322.30
7.0.60.0070.06022.29
7.0.50.0200.04722.22
7.0.40.0070.06322.19
7.0.30.0130.05322.19
7.0.20.0130.05722.19
7.0.10.0030.06022.18
7.0.00.0200.04722.28
5.6.270.0130.05721.21
5.6.260.0030.06321.19
5.6.250.0070.05721.19
5.6.240.0100.06321.00
5.6.230.0070.07021.18
5.6.220.0070.06020.96
5.6.210.0200.04721.07
5.6.200.0170.05721.20
5.6.190.0170.05021.00
5.6.180.0070.06021.03
5.6.170.0100.05720.92
5.6.160.0130.05321.00
5.6.150.0070.06021.02
5.6.140.0070.06021.10
5.6.130.0170.04721.17
5.6.120.0100.05720.90
5.6.110.0130.05320.98
5.6.100.0000.06721.02
5.6.90.0170.04721.09
5.6.80.0130.07020.53
5.6.70.0100.06720.50
5.6.60.0170.05020.38
5.6.50.0070.05320.41
5.6.40.0100.05320.50
5.6.30.0070.06320.54
5.6.20.0130.07320.26
5.6.10.0130.07020.36
5.6.00.0070.06020.52

preferences:
56.64 ms | 1585 KiB | 5 Q