3v4l.org

run code in 300+ PHP versions simultaneously
<?php $TEST_HTML = '<html><body><input type="checkbox" checked></body></html>'; $domNew = Dom\HTMLDocument::createFromString($TEST_HTML, options: LIBXML_HTML_NOIMPLIED); $domOld = new DOMDocument(encoding: 'UTF-8'); $domOld->loadHTML($TEST_HTML, options: LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); echo 'Dom\HTMLDocument::saveHtml():', "\n"; echo $domNew->saveHtml(), "\n"; echo "\n"; echo 'DOMDocument::saveHTML():', "\n"; echo $domOld->saveHTML(), "\n";
Output for git.master, git.master_jit
Dom\HTMLDocument::saveHtml(): <html><body><input type="checkbox" checked=""></body></html> DOMDocument::saveHTML(): <html><body><input type="checkbox" checked></body></html>

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:
34.55 ms | 405 KiB | 5 Q