3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = <<<HTML <div class="directions"> <div class="left">ä,ö,ü</div> <div class="right">right</div> </div> HTML; libxml_use_internal_errors(true); libxml_disable_entity_loader(true); $html = new DOMDocument(); $html->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8')); $xpath = new DOMXpath($html); $result = $xpath->query('//div[contains(@class, "left")]'); echo $result[0]->textContent;
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Function libxml_disable_entity_loader() is deprecated in /in/M0TQX on line 11 Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead in /in/M0TQX on line 14 ä,ö,ü

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:
35.88 ms | 406 KiB | 5 Q