i am confused about the PHP functions ob_flush()
and ob_end_flush()
.
About the function ob_flush
the manual says
The buffer contents are discarded after ob_flush() is called.This function does not destroy the output buffer like ob_end_flush() does.
i am confused about the words discarded
and destroyed
here. Even if the buffer contents are discarded in case of ob_flush()
they cant be accessed and even if they are destroyed as in case of ob_end_flush()
they cant be accessed.
Then whats the difference between these two functions?
UPDATE:
In response to JamWaffles answer I dont understand the significance of deleting everything in the buffer but keeping the buffer vs deleting the whole buffer(freeing it) because PHP has no concept of pointers and you cant get the address of buffers so it should be immaterial whether you keep the empty buffer with you or you free it