Supported Versions: PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8
Get the contents of the active output buffer and turn it off
<?php ob_get_clean(): string|false
<?php         $callback();



        return ob_get_clean();

    }



    function getFilenameFromContentDispositionHeader($header)
<?php         ob_start();

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

        $rawFileContents = ob_get_clean();



        $this->assertEquals($file->get(), $rawFileContents);
<?php         ob_start();

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

        $response->sendContent();

        $rawFileContents = ob_get_clean();

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



        ob_start();
<?php         ]);

        $cachedResponse->sendContent();

        $this->assertEquals(304, $cachedResponse->getStatusCode());

        $cachedFileContents = ob_get_clean();



        $this->assertEquals('', $cachedFileContents);

    }
<?php         ob_start();

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

        $rawFileContents = ob_get_clean();



        $this->assertEquals($file->get(), $rawFileContents);
<?php         ob_start();

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

        $rawFileContents = ob_get_clean();



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

    }
<?php         ob_start();

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

        $rawFileContents = ob_get_clean();



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

    }
<?php             $this->handleViewException($e, $obLevel);

        }



        return ltrim(ob_get_clean());

    }