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; preg_replace("/<[^\/]+\/.*>/mi", "", $str, 1);

preferences:
38.92 ms | 402 KiB | 5 Q