3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = <<<EOL <p> </p> <h2>Content</h2> <p>Content</p> <h2>Content</h2> <p>Content</p> EOL; echo preg_replace("/<[^\/]+\/.*>/mi", "", $str);

preferences:
47.37 ms | 402 KiB | 5 Q