3v4l.org

run code in 200+ PHP versions simultaneously
<?php $html = <<< HTML <!doctype html> <html> <head> <link rel="shortcut icon" href="https://google.com"/> </head> <body></body> </html> HTML; $doc = new DOMDocument; $doc->loadHtml($html); $xpath = new DomXPath($doc); echo $xpath->query('.//link[@rel="shortcut icon"]')->item(0)->getAttribute('href');
based on OS3RP
Output for 5.6.0 - 7.4.1
https://google.com