3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new DOMDocument; $dom->loadHTML(<<<'H_T_M_L' <html><body> <div class="app_content"> <ul class="js-events-container">... <li class="single-event live">...</li> <li class="single-event live">...</li> <li class="single-event live">...</li> <li class="single-event live">...</li> <li class="single-event live"> ::before //First DIV of li <div class="single-event__code"> Event Code: <strong>96441</strong> </div> <div class="single-event__time"> <span class="score js-score">LIVE</span> <span class="time js-timer"></span> </div> <div class="single-event__players"> <a href="/sportsbook/SOCCER/BRAZIL_SERIE_D/400953/"> AA Portuguesa RJ <span> v </span> Audax SP </a> </div> <div class="single-event__bets three markets"> <div class="single-event__bets__container js-bets-container"> </body></html> H_T_M_L ); $xp = new DOMXPath($dom); $coll = $xp->query('//div[@class="single-event__code"]'); if ($coll->length) { foreach ($coll as $item) { echo $item->nodeValue, "\n"; } }
Output for git.master, git.master_jit, rfc.property-hooks
Event Code: 96441

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