3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pizza = 'http://www.tuin.co.uk/images/D/2-10.jpg,http://www.tuin.co.uk/images/D/40.0535-t02-12%20Skov.jpg,http://www.tuin.co.uk/images/D/28mm%20log-04.jpg,http://www.tuin.co.uk/images/D/Skov-log-cabin.jpg,http://www.tuin.co.uk/images/D/Skov-log-cabin-01.jpg,http://www.tuin.co.uk/images/D/Skove-log-cabin.jpg,http://www.tuin.co.uk/images/D/skov-28mm-log-'; $pieces = explode(",", $pizza); echo count($pieces); //foreach ($pieces as $arr) //{ // if (filter_var('http://www.tuin.co.uk/images/D/skov-28mm-log-', FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)) { // echo $arr.'<br>'; // } // else echo $arr.'<br><br>'; //} if (filter_var('http://www.tuin.co.uk/images/D/skov-28mm-log-', FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED)) { echo '<br>'; }

preferences:
30.37 ms | 405 KiB | 5 Q