Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could do ob_start(); include '...'; ob_end_clean();, but it turns out that die() (say, in a custom error handler) () causes an implicit buffer flush. So it's not a foolproof solution.


You can attach a callback to the buffer to prevent that implicit flush.

    ob_start(function() {});


Thanks, I'll investingate and probably adopt it for my code :D


Or register_shutdown_function - http://blog.kevburnsjr.com/php-fatal-error-500




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: