ob_start
brefphp/bref
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Turn on output buffering
ob_start
(callable
$callback
=
null
,
int $chunk_size
=
0
,
int $flags
=
PHP_OUTPUT_HANDLER_STDFLAGS
):
bool
$app
->
register
(
'phpinfo'
)
->
setCode
(function (
InputInterface $input
,
OutputInterface $output
):
int
{
ob_start
();
phpinfo
();
$phpinfo
=
ob_get_clean
();
$output
->
write
(
$phpinfo
);
demo/console.php
{
parent
::
setUp
();
ob_start
();
$this
->
fakeContext
= new
Context
(
'abc'
,
time
(),
'abc'
,
'abc'
);
}
tests/Handler/FpmHandlerLoadBalancerTest.php
{
parent
::
setUp
();
ob_start
();
$this
->
fakeContext
= new
Context
(
'abc'
,
time
(),
'abc'
,
'abc'
);
}
tests/Handler/FpmHandlerTest.php
protected function
setUp
():
void
{
ob_start
();
Server
::
start
();
$this
->
runtime
= new
LambdaRuntime
(
'localhost:8126'
,
'phpunit'
);
}
tests/Runtime/LambdaRuntimeTest.php