3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php ob_end_clean(); header("Connection: close"); ignore_user_abort(); // optional ob_start(); echo ('Text the user will see'); $size = ob_get_length(); header("Content-Length: $size"); ob_end_flush(); // Strange behaviour, will not work flush();            // Unless both are called ! // Do processing here sleep(30);echo('Text user will never see');?>
Output for 5.3.7 - 7.1.0
Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in /in/87N4H on line 7 Warning: Cannot modify header information - headers already sent by (output started at /in/87N4H:7) in /in/87N4H on line 8 Text the user will see Warning: Cannot modify header information - headers already sent by (output started at /in/87N4H:7) in /in/87N4H on line 12 Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush in /in/87N4H on line 13
Process exited with code 137.