3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '<h2><strong>Automatic Writing</strong> <strong>– A Conduit For An Entity From Another World?</strong></h2>'; echo preg_replace_callback('~<h([1-6])>.*?</h\1>~is', function($m) { return preg_replace('~</?strong>~i', '', $m[0]); } , $s);

preferences:
34.62 ms | 405 KiB | 5 Q