3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '&lt;a href="http://lenta.ru/news/2015/07/23/tsipras/" &gt; &amp;laquo;Лента.ру&amp;raquo; &lt;/a&gt;'; $aq = preg_replace('~&lt;a\b[^&gt;]*+&gt;|&lt;/a\b[^&gt;]*+&gt;~', '', $string); echo $aq; echo '<br /><br /><br />'.strip_tags(htmlspecialchars_decode($string), '<a>');

preferences:
67.48 ms | 402 KiB | 5 Q