3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'before <cite>Quote from <a href="/page.php" class="link">Testuser ยป 29.09.2016 15:08</a>:</cite> after'; $str = preg_replace_callback("/<cite>.*<\/cite>/i", "replace", $str); function replace($matches){ return strip_tags($matches[0], "<cite>"); } echo $str;

preferences:
100.35 ms | 1707 KiB | 5 Q