3v4l.org

run code in 300+ PHP versions simultaneously
<?php $moreOrig = "https://duckduckgo.com is better than https://google.com"; $testUrl = "@((https?|ftps?)://([\w\-.]+\.[a-zA-Z]{2,3})(/\S*)?)@"; echo preg_replace($testUrl, "<a href='$1'>$3</a>", $moreOrig);

preferences:
31.01 ms | 404 KiB | 5 Q