3v4l.org

run code in 300+ PHP versions simultaneously
<?php $source = ' <form method="post" action="arrived.php" class="_arrived"> <input type="hidden" name="type1" value="value1" autocomplete="off"> <input type="hidden" name="type2" value="value2" autocomplete="off"> <input type="hidden" name="type3" value="value3"> <input type="hidden" name="type4" value="value4"> </form> <form method="post" action="destiny.php" class="_class"> <input type="hidden" name="type1" value="value1" autocomplete="off"> <input type="hidden" name="type2" value="value2" autocomplete="off"> <input type="hidden" name="type3" value="value3"> <input type="hidden" name="type4" value="value4"> <input type="hidden" name="type5" value="value5"> <input type="hidden" name="type6" value="value6"> <input type="hidden" name="type7" value="value8"> <input type="hidden" name="type8" value="value9"> </form>'; $dom = new DOMDocument(); //$internalErrors = libxml_use_internal_errors(true); $dom->loadHTML($source); $xpath = new DOMXpath($dom); $items = $xpath->query('//form[@class="_class"]'); $form = $items->item(0); $element = $form->getElementsByTagName("input"); foreach($element as $elemen){ echo $elemen->getAttribute('name').'<br>'; }
Output for git.master, git.master_jit, rfc.property-hooks
type1<br>type2<br>type3<br>type4<br>type5<br>type6<br>type7<br>type8<br>

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:
162.33 ms | 405 KiB | 5 Q