3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<EOT <html> <body> <img src="img1.jpg" /> <img src="img2.jpg" /> <a href="#"> link 1</a> <a href="page.HTML">link 2</a> </body> </html> EOT; $d = new DOMDocument(); $d->loadHTML($str); $sx = simplexml_import_dom($d); foreach ($sx->xpath('') as $v) { echo $v->getName() . "\n"; }
Output for git.master, git.master_jit
Warning: SimpleXMLElement::xpath(): Invalid expression in /in/jdcs8 on line 20 Warning: SimpleXMLElement::xpath(): xmlXPathEval: evaluation failed in /in/jdcs8 on line 20 Warning: foreach() argument must be of type array|object, bool given in /in/jdcs8 on line 20
Output for rfc.property-hooks
Warning: SimpleXMLElement::xpath(): Invalid expression in /in/jdcs8 on line 20 Warning: SimpleXMLElement::xpath(): xmlXPathEval: evaluation failed in /in/jdcs8 on line 20 Warning: foreach() argument must be of type array|object, false given in /in/jdcs8 on line 20

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
120.1 ms | 407 KiB | 5 Q