3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <h2>Title of post</h2> 1 category <strong>task 1</strong> 1 category <strong>task 2</strong> 1 category <strong>task 3</strong>&nbsp; HTML; $dom=new DOMDocument; $dom->loadHTML($html); $xpath = new DOMXPath($dom); foreach ($xpath->query('//h2/following-sibling::text()') as $node) { var_export(trim($node->textContent)); echo "\n"; }
Output for git.master_jit, git.master, rfc.property-hooks
'1 category' '1 category' '1 category' ' '

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