3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new DOMDocument(); $dom->loadHtml(' <tr class="ipl-zebra-list__item"> <td class="ipl-zebra-list__label">Official Sites</td> <td> <ul class="ipl-inline-list"> <li class="ipl-inline-list__item"> <a href="https://www.indiegogo.com/projects/super-troopers-2">IndieGoGo page</a> </li> <li class="ipl-inline-list__item"> <a href="https://www.facebook.com/SuperTroopersMovie/">Official site</a> </li> </ul> </td> </tr> ', LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $xpath = new DOMXPath($dom); $arr['sites1'] = []; foreach ($xpath->query("//li[@class=\"ipl-inline-list__item\"]/a") as $link) { $href = $link->getAttribute('href'); $arr['sites1'][] = $href; } print_r($arr['sites1']);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => https://www.indiegogo.com/projects/super-troopers-2 [1] => https://www.facebook.com/SuperTroopersMovie/ )

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