3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html=<<<HTML <html> <head></head> <body> <table><tr><td>123</td><td>123</td><td>123</td><td>123</td><td>123</td></tr> <tr><td class="group">777</td><td>123</td><td>123</td><td>123</td><td class="mk">888</td></tr> </table> </body> </html> HTML; $dom=new DOMDocument("1.0","UTF-8"); $dom->loadHTML($html); $xpath=new DOMXPath($dom); foreach($xpath->query('//td[@class="group" or @class="mk"]') as $node) { echo $node->attributes->getNamedItem("class")->nodeValue; echo ": "; echo $node->textContent; echo "\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
group: 777 mk: 888

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