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);
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.24, 8.3.0 - 8.3.12
ahsgdjagshjdgasjdgajgsd gjagdjhagsjhgda sgdhjagsjdgajhgdjad<a <a href="aHR0cDovL3Nob3J0LmF3c3Vicy5jby9iZTlWaw==">Solidfiles</a> jashd sha7st7atsdgasgda sgahsfd ahgsfafd<a <a href="aHR0cHM6Ly9saW5rLnNhZmVsaW5rY29udmVydGVyLmNvbS9yZXZpZXcucGhwP2lkPWFIUjBjRG92TDJKZmRDNXNlUzh5U0RkTWFqaDMmYz0xJnVzZXI9NjE5NDI=" rel=nofollow>Zippyshare</a>

preferences:
78.57 ms | 408 KiB | 5 Q