3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type: text/plain; charset=utf-8'); $body = file_get_contents('http://chat.stackoverflow.com/search?q=tag%3Acv-pls%20tag%3Adelv-pls&Room=11&page=1&pagesize=50&sort=newest'); $qids = []; libxml_use_internal_errors(true); $doc = new DOMDocument; $doc->loadHTML($body); $xpath = new DOMXpath($doc); $nodes = $xpath->query("//a[contains(@href, 'tagged')]/following-sibling::a[not(contains(@href, 'tagged')) and not(contains(@href, '#'))]"); foreach ($nodes as $node) { /** @var $node DOMElement */ if (preg_match('#(?:q|questions)/(?P<qid>\d+)#', $node->getAttribute('href'), $matches)) { $qids[] = $matches['qid']; } } print_r($qids);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for chat.stackoverflow.com failed: System error in /in/GBcMZ on line 5 Warning: file_get_contents(http://chat.stackoverflow.com/search?q=tag%3Acv-pls%20tag%3Adelv-pls&Room=11&page=1&pagesize=50&sort=newest): Failed to open stream: php_network_getaddresses: getaddrinfo for chat.stackoverflow.com failed: System error in /in/GBcMZ on line 5 Fatal error: Uncaught ValueError: DOMDocument::loadHTML(): Argument #1 ($source) must not be empty in /in/GBcMZ:10 Stack trace: #0 /in/GBcMZ(10): DOMDocument->loadHTML('') #1 {main} thrown in /in/GBcMZ on line 10
Process exited with code 255.

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