3v4l.org

run code in 500+ PHP versions simultaneously
<?php $content = <<<CONTENT <span class="ipsHide" data-role="downloadCounterContainer">Download begins in <span data-role="downloadCounter"></span> seconds</span> <a href='https://example.com/forum/files/file/2-content/?do=download&amp;r=24050&amp;confirm=1&amp;t=1&amp;csrfKey=72c4d0ffcabb34c6d6c490cbacbc354ag1536355261' class='ipsButton ipsButton_primary ipsButton_small' data-action="download" >Download</a> CONTENT; $doc = new DOMDocument(); $doc->loadHTML($content); $xpath = new DomXPath($doc); $results = $xpath->query("//a[contains(@class, 'ipsButton') and contains(@class, 'ipsButton_primary') and contains(@class, 'ipsButton_small')]"); foreach ($results as $result) { $url = parse_url($result->getAttribute("href"), PHP_URL_QUERY); parse_str($url, $params); echo $params['csrfKey']; }
Output for git.master, git.master_jit, rfc.property-hooks
72c4d0ffcabb34c6d6c490cbacbc354ag1536355261

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:
50.53 ms | 1569 KiB | 4 Q