ob_get_status

FunctionParams and return types changed in PHP 8.0

Get status of output buffers.

PHP 5
PHP 7
PHP 8.0
Improved
PHP 8.1
PHP 8.2-8.3
PHP 8.4
PHP 8.5
PHP 8.6

ob_get_status Function synopsis

ob_get_status(bool $full_status = false): array

Parameters

$full_status

OptionalTypeboolDefault valuefalse

true to return all active output buffer levels. If false or not set, only the top level output buffer is returned.

Return value

Typearray

If $full_status is omitted or false a simple array holding status information on the active output level is returned.

If $full_status is true an array with one element for each active output buffer level is returned. The output level is used as key of the top level array and each array element itself is another array holding status information on one active output level.

An empty array is returned if output buffering is not turned on.

Changes to the ob_get_status Function

PHP 8.0

  • Return type added: array
  • Parameter type added for parameter #1 ($full_status): bool
  • Parameter default value added for position #1 ($full_status): false
- ob_get_status($full_status)
+ ob_get_status(bool $full_status = false): array

ob_get_status Function Availability

PHP VersionAvailability
PHP 8.6Upcoming Release Yes
PHP 8.5Supported (Latest) Yes
PHP 8.4Supported Yes
PHP 8.3Security-Fixes Only Yes
PHP 8.2Security-Fixes Only Yes
PHP 8.1Unsupported Yes
PHP 8.0Unsupported Yes
PHP 7.4Unsupported Yes
PHP 7.3Unsupported Yes
PHP 7.2Unsupported Yes
PHP 7.1Unsupported Yes
PHP 7.0Unsupported Yes
PHP 5.6Unsupported Yes
PHP 5.5Unsupported Yes
PHP 5.4Unsupported Yes
PHP 5.3Unsupported Yes