3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $body = '<body link="#0066FF" vlink="#6633CC" bgcolor="#33D7FF" style=\'margin:0\'>'."\n\n"; $body .= '<object type="application/x-shockwave-flash" data="http://flash-mp3-player.net/medias/player_mp3.swf" width="200" height="20">'."\n"; $body .= ' <param name="movie" value="http://flash-mp3-player.net/medias/player_mp3.swf" />'."\n"; $body .= ' <param name="bgcolor" value="#ffffff" />'."\n"; $body .= ' <param name="FlashVars" value="mp3=%MP3%&amp;loop=1&amp;autoplay=1" />'."\n"; $body .= '</object>'."\n"; $html = '<html><body link="#0066FF" vlink="#6633CC" bgcolor="#4CDCFF" style=\'margin:0\'>asddasdas</body></html>'; echo preg_replace('#<body[^>]+>#', " aaa $0 aaa ", $html);
Output for 4.3.0 - 7.1.0
<html> aaa <body link="#0066FF" vlink="#6633CC" bgcolor="#4CDCFF" style='margin:0'> aaa asddasdas</body></html>