ob_get_contents
laravel/framework
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Return the contents of the output buffer
ob_get_contents
():
string
|
false
include
__DIR__
.
"/../../resources/views/components/
$view
.php"
;
return
tap
(
ob_get_contents
(), function () {
ob_end_clean
();
});
}
src/Illuminate/Console/View/Components/Component.php
ob_start
();
eval(
Str
::
of
(
$this
->
compiler
->
compileString
(
$blade
))->
remove
([
'<?php'
,
'?>'
]));
$output
=
ob_get_contents
();
ob_end_clean
();
$this
->
assertSame
(
$expectedOutput
,
$output
);
tests/View/Blade/BladeEchoHandlerTest.php