3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <form action="blabla.php" method=post> <input type="text" name="campaign" disabled=""> <input type="text" name="id" value="this-is-what-i-am-trying-to-extract"> </form> HTML; $dom = new DOMDocument(); $dom->loadHTML($html); $xpath = new DOMXPath($dom); $tags = $xpath->query('//input'); foreach ($tags as $tag) { $b = $tag->hasAttribute('disabled') ? true : false; echo $tag->getAttribute('name')." is disabled:".$b."\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
campaign is disabled:1 id is disabled:

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