3v4l.org

run code in 300+ PHP versions simultaneously
<?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);

preferences:
33.43 ms | 402 KiB | 5 Q