3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML </li> <li > <div class="widget-post-holder"> <a href="/45214" title="care with your skin against pollution" class="post-thumb" > <span class="post-cont"> health </span> <div class="librLoaderLine"></div> <img title="care with your skin against pollution" id="0045214" class="te lazy js-postPreview" data-src="https://wemedic.com/media/posts/201105/23/45214/original/14.jpg" src="https://wemedic.com/media/posts/201105/23/45214/original/14.jpg" data-libr="https://healthandc.com/media/posts/201105/23/45214/libr_225k_45214.webm" alt="care with your skin against pollution" /> <span class="hd-post" onclick="window.location.href ='/45214'"></span> </a> </li> <li > <div class="widget-post-holder"> <a href="/7487423" title="natural hair straightening" class="post-thumb" > <span class="post-cont"> health </span> <div class="librLoaderLine"></div> <img title="natural hair straightening" id="0045214" class="te lazy js-postPreview" data-src="https://wemedic.com/media/posts/201105/23/7487423/original/14.jpg" src="https://wemedic.com/media/posts/201105/23/45214/original/14.jpg" data-libr="https://healthandc.com/media/posts/201105/23/7487423/libr_225k_7487423.webm" alt="care with your skin against pollution" /> <span class="hd-post" onclick="window.location.href ='/7487423'"></span> </a> HTML; $dom = new DOMDocument(); libxml_use_internal_errors(true); $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $xpath = new DOMXPath($dom); $results = []; foreach ($xpath->query('//*/@href') as $val) { if (preg_match('~^/\d{4,}$~', $val->value)) { array_push($results, $val->value); } } print_r($results);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => /45214 [1] => /7487423 )

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