ob_get_clean
brefphp/bref
Supported Versions: PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8
Get current buffer contents and delete current output buffer
ob_get_clean
():
string
|
false
->
setCode
(function (
InputInterface $input
,
OutputInterface $output
):
int
{
ob_start
();
phpinfo
();
$phpinfo
=
ob_get_clean
();
$output
->
write
(
$phpinfo
);
return
Command
::
SUCCESS
;
})
demo/console.php