3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = 'ahsgdjagshjdgasjdgajgsd gjagdjhagsjhgda sgdhjagsjdgajhgdjad<a href="http://short.awsubs.co/be9Vk">Solidfiles</a> jashd sha7st7atsdgasgda sgahsfd ahgsfafd<a href=https://link.safelinkconverter.com/review.php?id=aHR0cDovL2JfdC5seS8ySDdMajh3&c=1&user=61942 rel=nofollow>Zippyshare</a>'; echo preg_replace_callback('~href=[\'"]?([^\s\'"]+)[\'"]?(.*?)>(.*?)</a>~', function($m) { //var_export($m); return "<a href=\"" . base64_encode($m[1]) . "\"{$m[2]}>{$m[3]}</a>"; }, $html);

preferences:
25.82 ms | 405 KiB | 5 Q