3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <a name="file_type_definition"></a>file_type_definition ::= <font color=#a08000><strong>FILE<strong>other stuff</strong></strong></font> <font color=#a08000><strong>OF</strong></font> <a href="#type_mark">type_mark</a> HTML; $dom = new DOMDocument(); $dom->loadHTML($html); $xpath = new DOMXPath($dom); foreach($xpath->query('//strong') as $strong) { $strong->parentNode->replaceChild(new DOMText(sprintf("'%s'", $strong->textContent)),$strong); } var_dump($dom->textContent);
Output for git.master, git.master_jit, rfc.property-hooks
string(59) "file_type_definition ::= 'FILEother stuff' 'OF' type_mark"

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