They both seem to do the same thing: return the output buffer content to you and delete it aftewards.
Which one should I use?
ob_get_clean()
removes the buffer (without printing it), and returns its content.
ob_get_flush()
prints the buffer, removes it, and returns its content.
Both function will terminate the buffer.