3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type:text/html;charset=utf-8'); $xhtml = '<html> <body> <para>This is a paragraph</para> <para>This is another paragraph</para> </body> </html>'; $doc = new DOMDocument(); libxml_use_internal_errors(true); $doc->loadHTML($xhtml); $doc->preserveWhiteSpace=false; libxml_use_internal_errors(false); $xpath = new DOMXpath($doc); $elements = $xpath->query("//para"); foreach ($elements as $node){ echo $node->nodeValue. "<br/>"; }
Output for git.master, git.master_jit, rfc.property-hooks
This is a paragraph<br/>This is another paragraph<br/>

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:
39.31 ms | 401 KiB | 8 Q