OB_GET_STATUS(3) 1 OB_GET_STATUS(3)ob_get_status - Get status of output buffersSYNOPSIS
array ob_get_status ([bool $full_status = FALSE])
DESCRIPTION ob_get_status(3) returns status information on either the top level output buffer or all active output buffer levels if $full_status is set
to TRUE.
PARAMETERS
o $full_status
- TRUE to return all active output buffer levels. If FALSE or not set, only the top level output buffer is returned.
RETURN VALUES
If called without the $full_status parameter or with $full_status = FALSE a simple array with the following elements is returned:
Array
(
[level] => 2
[type] => 0
[status] => 0
[name] => URL-Rewriter
[del] => 1
)
Simple ob_get_status(3) results
Key:level
Value:Output nesting level
Key:type
Value: PHP_OUTPUT_HANDLER_INTERNAL (0) or PHP_OUTPUT_HANDLER_USER (1)
Key:status
Value:One of PHP_OUTPUT_HANDLER_START (0), PHP_OUTPUT_HANDLER_CONT (1) or PHP_OUTPUT_HANDLER_END (2)
Key:name
Value:Name of active output handler or ' default output handler' if none is set
Key:del
Value:Erase-flag as set by ob_start(3)
If called with $full_status = 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.
Array
(
[0] => Array
(
[chunk_size] => 0
[size] => 40960
[block_size] => 10240
[type] => 1
[status] => 0
[name] => default output handler
[del] => 1
)
[1] => Array
(
[chunk_size] => 0
[size] => 40960
[block_size] => 10240
[type] => 0
[buffer_size] => 0
[status] => 0
[name] => URL-Rewriter
[del] => 1
)
)
The full output contains these additional elements:
Full ob_get_status(3) results
Key:chunk_size
Value:Chunk size as set by ob_start(3)
Key:size
Value:...
Key:blocksize
Value:...
SEE ALSO ob_get_level(3), ob_list_handlers(3).
PHP Documentation Group OB_GET_STATUS(3)
Check Out this Related Man Page
PRINT_R(3) 1 PRINT_R(3)print_r - Prints human-readable information about a variableSYNOPSIS
mixed print_r (mixed $expression, [bool $return = false])
DESCRIPTION print_r(3) displays information about a variable in a way that's readable by humans.
print_r(3), var_dump(3) and var_export(3) will also show protected and private properties of objects with PHP 5. Static class members will
not be shown.
PARAMETERS
o $expression
- The expression to be printed.
o $return
- If you would like to capture the output of print_r(3), use the $return parameter. When this parameter is set to TRUE, print_r(3)
will return the information rather than print it.
RETURN VALUES
If given a string, integer or float, the value itself will be printed. If given an array, values will be presented in a format that shows
keys and elements. Similar notation is used for objects.
When the $return parameter is TRUE, this function will return a string. Otherwise, the return value is TRUE.
NOTES
Note
When the $return parameter is used, this function uses internal output buffering so it cannot be used inside an ob_start(3) callback
function.
EXAMPLES
Example #1
print_r(3) example
<pre>
<?php
$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z'));
print_r ($a);
?>
</pre>
The above example will output:
<pre>
Array
(
[a] => apple
[b] => banana
[c] => Array
(
[0] => x
[1] => y
[2] => z
)
)
</pre>
Example #2
$return parameter example
<?php
$b = array ('m' => 'monkey', 'foo' => 'bar', 'x' => array ('x', 'y', 'z'));
$results = print_r($b, true); // $results now contains output from print_r
?>
SEE ALSO ob_start(3), var_dump(3), var_export(3).
PHP Documentation Group PRINT_R(3)