3v4l.org

run code in 300+ PHP versions simultaneously
<?php $body = "&nbps; &#8820; <h1>h1</h1> Paragraph <a href=\"http://google.com/\">link</a> <strong>Bold</strong> <em>italic</em> <em><strong>bolditalic</strong></em>&nbsp;<span style=\"background-color: #ffff00; \"></span> <h2>h2</h2> Paragraph <span style=\"font-size: xx-small;\">size1</span> <span style=\"font-size: x-small;\">size2</span> <span style=\"font-size: medium;\">size4</span> <h3>h3</h3> Paragraph <span style=\"text-decoration: underline;\">underline</span> <span style=\"text-decoration: line-through;\">strikethrough</span> <span style=\"color: #ff0000;\">color</span> <span style=\"background-color: #ffff00; \">background</span> <blockquote>Blockquoted paragraph</blockquote> Paragraph following blockquote <ul> <li>Unordered</li> <li>List</li> </ul> Paragraph between lists <ol> <li>Ordered</li> <li>List</li> </ol> Paragraph between lists <ul> <li>OL list</li> <li>nested <ol> <li>inside a</li> <li>UL list</li> </ol></li> </ul> Paragraph between lists <table border=\"0\"> <tbody> <tr> </tr> <tr> <td>Table with</td> <td></td> </tr> <tr> <td></td> <td>border=0</td> </tr> </tbody> </table> Paragraph <ol> <li>UL list</li> <li>nested <ul> <li>inside a</li> <li>OL list</li> </ul> </li> </ol> Paragraph between tables <table border=\"1\" cellpadding=\"5\"> <tbody> <tr> <td>Table with border=1</td> <td></td> </tr> <tr> <td></td> <td>cellpadding = 5</td> </tr> </tbody> </table> Paragraph between tables <table border=\"2\"> <tbody> <tr> <td>Table with</td> <td></td> </tr> <tr> <td></td> <td>border=2</td> </tr> </tbody> </table>"; $html = "<html><meta http-equiv='content-type' content='text/html; charset=UTF-8'><body>$body</body></html>"; $doc = new DOMDocument(); libxml_use_internal_errors(true); $doc->loadHTML($html); $xpath = new DOMXPath($doc); $nodeList = $xpath->query('//body[1]'); echo ((get_class($nodeList->item(0)) == 'DOMElement') ? 'PASS' : 'FAIL');
Output for git.master, git.master_jit, rfc.property-hooks
PASS

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.88 ms | 401 KiB | 8 Q