3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'http://example.com/this//that/and/the/other/file.php'; echo preg_replace("/(?<!\:)\/+/", "/", $string);

preferences:
25.84 ms | 404 KiB | 5 Q