3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = "<p>äöü</p><p>ß</p>"; // multibyte UTF-8 input $doc = new DOMDocument('1.0', 'UTF-8'); // DOMDocument has no info about the charset/encoding, defaults to latin-1 $doc->loadHTML($content, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); var_dump($doc->saveHTML()); // Output: string(75) "<p>&Atilde;&curren;&Atilde;&para;&Atilde;&frac14;<p>&Atilde;&#159;</p></p> " // 1) element "reordering" issue (see: http://stackoverflow.com/questions/29493678/loadhtml-libxml-html-noimplied-on-an-html-fragment-generates-incorrect-tags) // 2) encoding issue
Output for git.master, git.master_jit, rfc.property-hooks
string(75) "<p>&Atilde;&curren;&Atilde;&para;&Atilde;&frac14;<p>&Atilde;&#159;</p></p> "

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