3v4l.org

run code in 150+ 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.11 - 4.4.1, 4.4.3 - 5.1.1, 5.1.3 - 7.1.0
Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /in/GYPQD on line 11
Output for 4.4.2, 5.1.2
Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /in/GYPQD on line 12
Output for 4.3.0 - 4.3.10
Warning: Delimiter must not be alphanumeric or backslash in /in/GYPQD on line 11