3v4l.org

run code in 300+ PHP versions simultaneously
<?php $htmlC = '<html><body>fdagedg sgsdfg </body> </html>'; $htmlsend = $htmlC; $pos = strpos($htmlsend, '</body>'); if ($pos !== false) { $strBeforeBody = substr($htmlsend, 0, $pos); $html = $strBeforeBody . '######sfdgzdfgdf########' . substr($htmlsend, $pos); $htmlC .= $html; print_r($htmlC); }

preferences:
35.36 ms | 402 KiB | 5 Q