3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <script> console.log('<h1>aaa<\/h1>'); </script> HTML; $dom = new DOMDocument(); libxml_use_internal_errors(true); $dom->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8"), LIBXML_HTML_NODEFDTD | LIBXML_HTML_NOIMPLIED); echo $dom->saveHTML();
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in /in/ldGmr on line 10 <script> console.log('<h1>aaa<\/h1>'); </script>

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