3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "</ul>\n<p>\n Evaluation<!--[if gte mso 9]><xml>\n<o:OfficeDocumentSettings>\n<o:AllowPNG />\n<o:TargetScreenSize>1024x768</o:TargetScreenSize>\n</o:OfficeDocumentSettings>\n</xml><![endif]--><!--[if gte mso 9]><xml>\n<w:WordDocument>\n<w:View>Normal</w:View>\n<w:Zoom>0</w:Zoom>\n<w:HyphenationZone>21</w:HyphenationZone>\n<w:PunctuationKerning />\n<w:ValidateAgainstSchemas />\n<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>\n<w:IgnoreMixedContent>false</w:IgnoreMixedContent>\n<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>\n<w:Compatibility>\n<w:BreakWrappedTables />\n<w:SnapToGridInCell />\n<w:WrapTextWithPunct />\n<w:UseAsianBreakRules />\n<w:DontGrowAutofit />\n</w:Compatibility>\n</w:WordDocument>\n</xml><![endif]--><!--[if gte mso 9]><xml>\n<w:LatentStyles DefLockedState=\"false\" LatentStyleCount=\"156\">\n</w:LatentStyles>\n</xml><![endif]--><!--[if gte mso 10]>\n<style>\n/* Style Definitions */\ntable.MsoNormalTable\n{mso-style-name:\"Normale Tabelle\";\nmso-tstyle-rowband-size:0;\nmso-tstyle-colband-size:0;\nmso-style-noshow:yes;\nmso-style-parent:\"\";\nmso-padding-alt:0cm 5.4pt 0cm 5.4pt;\nmso-para-margin:0cm;\nmso-para-margin-bottom:.0001pt;\nmso-pagination:widow-orphan;\nfont-size:10.0pt;\nfont-family:\"Times New Roman\";\nmso-ansi-language:#0400;\nmso-fareast-language:#0400;\nmso-bidi-language:#0400;}\n</style>\n<![endif]--></p>\n<ul>\n <li>"; $dom = new DOMDocument; $dom->loadHtml($str); $xpath = new DOMXPath($dom); foreach ($xpath->query('//comment()') as $comment) { $comment->parentNode->removeChild($comment); } echo $dom->saveXML($str);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: DOMDocument::loadHTML(): Unexpected end tag : ul in Entity, line: 1 in /in/tFGZp on line 6 Fatal error: Uncaught TypeError: DOMDocument::saveXML(): Argument #1 ($node) must be of type ?DOMNode, string given in /in/tFGZp:12 Stack trace: #0 /in/tFGZp(12): DOMDocument->saveXML('</ul>\n<p>\n E...') #1 {main} thrown in /in/tFGZp on line 12
Process exited with code 255.

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