how should I ensure nothing is being output to the browser?

by using session_destroy()?