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         $obLevel = ob_get_level();



        ob_start();