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:
51.59 ms | 402 KiB | 5 Q