3v4l.org

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