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>'; }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1 - 8.4.2
7 Fatal error: Uncaught Error: Undefined constant "FILTER_FLAG_SCHEME_REQUIRED" in /in/ci7vn:12 Stack trace: #0 {main} thrown in /in/ci7vn on line 12
Process exited with code 255.
Output for 7.3.16 - 7.3.31, 7.4.0 - 7.4.33
7 Deprecated: filter_var(): explicit use of FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED is deprecated in /in/ci7vn on line 12 <br>
Output for 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.38, 7.0.0 - 7.0.31, 7.1.0 - 7.1.23, 7.2.0 - 7.2.33, 7.3.32 - 7.3.33
7<br>
Output for 5.0.0 - 5.0.5, 5.1.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.3.11, 4.4.0 - 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

preferences:
57.92 ms | 412 KiB | 5 Q