php flush output buffer code example Example: php clean all output buffers while ( ob_get_level() ) { ob_end_clean(); }