3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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>'; }
based on I3UdZ
Output for 5.2.0 - 5.6.38, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.2.11
7<br>
Output for 5.0.0 - 5.1.6
7 Fatal error: Call to undefined function filter_var() in /in/ci7vn on line 12
Process exited with code 255.
Output for 4.4.5 - 4.4.9
7 Fatal error: Call to undefined function: filter_var() in /in/ci7vn on line 12
Process exited with code 255.
Output for 4.3.2 - 4.4.4
7 Fatal error: Call to undefined function: filter_var() in /in/ci7vn on line 12
Process exited with code 255.
Output for 4.3.0 - 4.3.1
7 Fatal error: Call to undefined function: filter_var() in /in/ci7vn on line 12