PHP Output Control ob_get_level() Function

PHP Output Control Functions : Indicate how many output buffers are active

Definition and Usage

The ob_get_level() function indicates how many output buffers are currently on the stack. PHP may be configured to automatically create an output buffer when the script begins, which is why the buffer level may be 1 without calling ob_start().

Syntax

ob_get_level();

Technical Details

Return Value: Returns an integer indicating how many output buffers are on the stack
PHP Version: 4.2+

❮ PHP Output Control Functions