3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = "<html><body> vdfbsdbg \n </body> \n </html>"; $pos = strpos($html, '</body>'); if ($pos !== false) { $str = substr($html, 0, $pos); $final = $str . '==IMG==' . substr($html, $pos); print_r($final); }

preferences:
35.71 ms | 402 KiB | 5 Q