3v4l.org

run code in 300+ PHP versions simultaneously
<?php $markup = <<<MARKUP <td><tvm></tvm><br><num>H7585</num></td><td><font color="#663399"></font></td> MARKUP; $domDocument = new \DOMDocument(); $domDocument->loadHTML($markup, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD | LIBXML_NOWARNING | LIBXML_NOERROR); $xpath = new DOMXPath($domDocument); /** @var DOMElement $numElement */ foreach ($xpath->query('//num') as $numElement) { $linkElement = $domDocument->createElement('a'); $linkElement->setAttribute('href', "https://link-here.php?id={$numElement->textContent}"); $numElement->parentNode->replaceChild($linkElement, $numElement); $linkElement->appendChild($numElement); } echo $domDocument->saveHTML();
Output for git.master, git.master_jit, rfc.property-hooks
<td><tvm></tvm><br><a href="https://link-here.php?id=H7585"><num>H7585</num></a><td><font color="#663399"></font></td></td>

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:
47.43 ms | 1554 KiB | 4 Q