PHP ob_get_status() Function Last Updated : 28 Sep, 2023 Comments Improve Suggest changes Like Article Like Report The ob_get_status() is an inbuilt function in PHP that is used for retrieving the status of the output buffer. Syntaxob_get_status(bool $full_status = false) : arrayParameter This function accepts only one parameter which is described below. $full_status: This is an optional parameter. If this parameter is set to 'true' then the function will return a detailed status array for all active output buffers. If this parameter is set to 'false' then it will return only basic information.Return Value The ob_get_status() function returns an array that contains all the information related to the output buffer. Program 1: The following program demonstrates the ob_get_status() Function. PHP <?php ob_start(); echo "This is content inside the buffer."; $bufferStatus = ob_get_status(); print_r($bufferStatus); ob_end_flush(); ?> Output: This is content inside the buffer.Array ( [name] => default output handler [type] => 0 [flags] => 112 [level] => 0 [chunk_size] => 0 [buffer_size] => 16384 [buffer_used] => 34 ) Program 2: The following program demonstrates the ob_get_status() Function. PHP <?php if (ob_get_status()) { echo "Output buffering is active."; } else { echo "Output buffering is not active."; } ob_start(); echo "This is content inside the buffer."; if (ob_get_status()) { echo "Output buffering is still active."; } else { echo "Output buffering is no longer active."; } ob_end_flush(); ?> Output: Output buffering is not active. This is content inside the buffer.Output buffering is still active. Reference: https://www.php.net/manual/en/function.ob-get-status.php Comment More infoAdvertise with us Next Article PHP ob_get_status() Function neeraj3304 Follow Improve Article Tags : PHP PHP-output PHP-function Similar Reads PHP | stat( ) function The stat() function in PHP is an inbuilt function which is used to return information of a file. The stat(0) function returns statistics of a file which is an array with the following elements : [0] or [dev] - Device number [1] or [ino] - Inode number [2] or [mode] - Inode protection mode [3] or [nl 4 min read PHP get_resources() Function The get_resources() function is an inbuilt function in PHP that returns active resources in an array form, & optionally, the resource type will be filtered. Syntax: array get_resources(?string $type = null)Parameters: This function accepts one parameter that is described below: type: This parame 1 min read PHP ob_get_level() Function The ob_get_level() function is an inbuilt function in PHP that is used to get the current output buffer level in a nested level. Output buffering is a feature in PHP that allows you to capture and manipulate output before it is sent to the browser or client. Syntaxob_get_level(): intParameter This f 2 min read PHP | stream_get_transports() Function The stream_get_transports() function is an inbuilt function in PHP which is used to get the list of registered socket transports. This function returns the indexed array containing the name of all available socket. Syntax: array stream_get_transports( void ) Parameters: This function does not accept 1 min read PHP | stream_get_wrappers() Function The stream_get_wrappers() function is an inbuilt function in PHP which is used to get the list of registered streams available on the running system. Syntax: array stream_get_wrappers( void ) Parameters: This function does not accept any parameter. Return Value: The function returns an array contain 1 min read PHP | connection_status() Function The connection_status() function is an inbuilt function in PHP which returns the current connection status. Syntax: int connection_status( void ) Parameters: This function doesn't accept any parameters. Return Value: This function returns the connection status bitfield. The possible values of return 2 min read PHP | stream_get_meta_data() Function The stream_get_meta_data() function is an inbuilt function in PHP which is used to get the header or meta data from the streams/file pointers.Syntax: array stream_get_meta_data( $stream ) Parameters: The function accepts single parameter $stream, which specifies the meta data to be retrieve and whic 2 min read PHP | stream_is_local() Function The stream_is_local() function is an inbuilt function in PHP which is used to check if a stream is a local stream or URL. Syntax: bool stream_is_local( $stream ) Parameters: This function accepts single parameter $stream, which is used to specify the stream to be check. Return Value: This function r 1 min read PHP ob_get_contents() Function The ob_get_contents() is an inbuilt function in PHP that is used to capture what is currently being buffered by the output buffer. This function returns the output buffer. Syntaxob_get_contents(): string | falseParameter This function does not accept any parameters. Return Value The ob_get_contents( 2 min read PHP | gd_info() Function The gd_info() function is an inbuilt function in PHP which is used to retrieve the information about the currently installed GD library. This function returns the information about the version and capabilities of the installed GD library. Syntax: array gd_info( void ) Parameters: This function does 2 min read Like