I can’t seem to find a good answer on this anywhere. If I am running output buffering, and a die() is fired, does that kick off an ob_end_flush() as well?
I can’t seem to find a good answer on this anywhere. If I am
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes it does. Any time the script ends gracefully, the buffers will be emptied. The only non-graceful endings are if it segmentation faults or if it’s killed (signal 9 SIG_KILL). The only place that
die()does a hard-kill of the process is if you call it inside of aregister_shutdown_function(But the buffers are flushed before the shutdown function is called, so there’s no issue there). See Connection Handling for some more information…