3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Dit is een link: <a href="bla.html">Tralalala</a>, en nog eentje: <a href="bla.html">Tralalala</a>'; $regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>"; preg_match_all("/$regexp/siU", $string, $matches); // $matches[2] = array of link addresses // $matches[3] = array of link text - including HTML code echo "test"; print_r($matches); ?>
Output for git.master, git.master_jit, rfc.property-hooks
testArray ( [0] => Array ( [0] => <a href="bla.html">Tralalala</a> [1] => <a href="bla.html">Tralalala</a> ) [1] => Array ( [0] => " [1] => " ) [2] => Array ( [0] => bla.html [1] => bla.html ) [3] => Array ( [0] => Tralalala [1] => Tralalala ) )

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:
35.21 ms | 402 KiB | 8 Q