3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml = <<<XML <html> <head><title></title></head> <body> <CONTENT/> </body> </html> XML; $content = "<div id='main'>asdf asdf</div>"; echo preg_replace('/<CONTENT\/>/',$content,$xml,1);
Output for 4.3.0 - 7.2.0
<html> <head><title></title></head> <body> <div id='main'>asdf asdf</div> </body> </html>