3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://www.google.de/maps/about/partners/businessview/get-started/'; // Remove all illegal characters from a url $url = filter_var($url, FILTER_SANITIZE_URL); // Validate url if (!filter_var($url, FILTER_VALIDATE_URL) === false) { echo("$url is a valid URL"); } else { echo("$url is not a valid URL"); }

preferences:
38.94 ms | 402 KiB | 5 Q