ob_start

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Turn on output buffering
<?php ob_start(?callable $callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT_HANDLER_STDFLAGS): bool
<?php     function captureOutput($callback)

    {

        ob_start();



        $callback();
<?php         \Livewire\Features\SupportDisablingBackButtonCache\SupportDisablingBackButtonCache::$disableBackButtonCache = false;



        ob_start();

        $this->get($photo->temporaryUrl())->sendContent();

        $rawFileContents = ob_get_clean();
<?php             ->set('photo', $file)

            ->viewData('photo');



        ob_start();

        $response = $this->get($photo->temporaryUrl());

        $response->sendContent();

        $rawFileContents = ob_get_clean();
<?php         $rawFileContents = ob_get_clean();

        $this->assertEquals($file->get(), $rawFileContents);



        ob_start();

        $cachedResponse = $this->get($photo->temporaryUrl(), [

            'If-Modified-Since' => $response->headers->get('last-modified'),

        ]);
<?php         \Livewire\Features\SupportDisablingBackButtonCache\SupportDisablingBackButtonCache::$disableBackButtonCache = false;



        ob_start();

        $this->get($photo->temporaryUrl())->sendContent();

        $rawFileContents = ob_get_clean();
<?php         SupportDisablingBackButtonCache::$disableBackButtonCache = false;



        ob_start();

        $this->get($photo->temporaryUrl())->sendContent();

        $rawFileContents = ob_get_clean();
<?php         ob_start();

        $this->get($photo->temporaryUrl())->sendContent();

        $rawFileContents = ob_get_clean();
<?php     {

        extract($data);



        ob_start();



        include __DIR__."/../../resources/views/components/$view.php";
<?php         }



        return tap(tmpfile(), function ($temp) use ($width, $height, $extension) {

            ob_start();



            $extension = in_array($extension, ['jpeg', 'png', 'gif', 'webp', 'wbmp', 'bmp'])

                ? strtolower($extension)
<?php             PHPUnit::fail('The response is not a streamed response.');

        }



        ob_start(function (string $buffer): string {

            $this->streamedContent .= $buffer;



            return '';

        });



        $this->sendContent();
<?php     public function startComponent($view, array $data = [])

    {

        if (ob_start()) {

            $this->componentStack[] = $view;



            $this->componentData[$this->currentComponent()] = $data;
<?php     {

        if (func_num_args() === 2 || $content !== null) {

            $this->slots[$this->currentComponent()][$name] = $content;

        } elseif (ob_start()) {

            $this->slots[$this->currentComponent()][$name] = '';



            $this->slotStack[$this->currentComponent()][] = [$name, $attributes];
<?php     public function startFragment($fragment)

    {

        if (ob_start()) {

            $this->fragmentStack[] = $fragment;

        }

    }
<?php     public function startSection($section, $content = null)

    {

        if ($content === null) {

            if (ob_start()) {

                $this->sectionStack[] = $section;

            }

        } else {