ob_get_clean
Description
The ob_get_clean of Output Control for PHP get current buffer contents and delete current output buffer.
Syntax
ob_get_clean(): string|false
Return
Returns the contents of the output buffer and end output buffering. If output buffering isn't active then false is returned.
Examples
1 · return
<? ob_start(); echo "output"; $return = ob_get_clean(); echo $return;
output
2 · same
<? ob_start(); echo "output"; $return = ob_get_contents(); ob_end_clean(); echo $return;
output