3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = ' <ul class="small-block-grid-1 medium-block-grid-3 large-block-grid-4 spCarousel"> <li><a href="/Nike-Pro-3-Shorts-131265.html"><img src="http://img1.theiconic.com.au/7BXi4UQfOYe0JssK5eoA2htIG_8=/fit-in/274x346/filters:fill(ffffff):quality(90):format(webp)/http%3A%2F%2Fstatic.theiconic.com.au%2Fp%2Fnike-5832-562131-2.jpg" width="100%"></a></li> <li><a href="http://www.theiconic.com.au/Tech-Capri-130367.html"><img src="http://img1.theiconic.com.au/SrNeE3dYXF1hF7NBDVNaeZhuTLA=/trim/fit-in/490x627/filters:quality(95):fill(ffffff)/http%3A%2F%2Fstatic.theiconic.com.au%2Fp%2Fnike-9908-763031-1.jpg" width="100%"></a></li> <li><a href="http://www.theiconic.com.au/Gelato-448-Push-Up-Crop-Top-in-Neon-Pink-158395.html"><img src="http://img1.theiconic.com.au/_Sh69_gKCFiagKDTtWEBaESt4WY=/trim/fit-in/490x627/filters:quality(95):fill(ffffff)/http%3A%2F%2Fstatic.theiconic.com.au%2Fp%2Frunning-bare-0938-593851-1.jpg" width="100%"></a></li> <li><a href="http://www.theiconic.com.au/Energy-Boost-2-in-Neon-Pink-162755.html"><img src="http://img1.theiconic.com.au/Kmd2GD5ZA_nNeyrLxyif2TYhGQM=/trim/fit-in/490x627/filters:quality(95):fill(ffffff)/http%3A%2F%2Fstatic.theiconic.com.au%2Fp%2Fadidas-performance-9782-557261-1.jpg" width="100%"></a></li> '; preg_match_all('#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#', $string, $match); echo "<pre>"; print_r($match); echo "</pre>";
based on OJ6cU
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
<pre>Array ( [0] => Array ( [0] => http://img1.theiconic.com.au/7BXi4UQfOYe0JssK5eoA2htIG_8=/fit-in/274x346/filters:fill(ffffff) [1] => http://www.theiconic.com.au/Tech-Capri-130367.html [2] => http://img1.theiconic.com.au/SrNeE3dYXF1hF7NBDVNaeZhuTLA=/trim/fit-in/490x627/filters:quality(95) [3] => http://www.theiconic.com.au/Gelato-448-Push-Up-Crop-Top-in-Neon-Pink-158395.html [4] => http://img1.theiconic.com.au/_Sh69_gKCFiagKDTtWEBaESt4WY=/trim/fit-in/490x627/filters:quality(95) [5] => http://www.theiconic.com.au/Energy-Boost-2-in-Neon-Pink-162755.html [6] => http://img1.theiconic.com.au/Kmd2GD5ZA_nNeyrLxyif2TYhGQM=/trim/fit-in/490x627/filters:quality(95) ) [1] => Array ( [0] => [1] => l [2] => [3] => l [4] => [5] => l [6] => ) ) </pre>