ob_end_clean

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Clean (erase) the contents of the active output buffer and turn it off
<?php ob_end_clean(): bool
<?php         include __DIR__."/../../resources/views/components/$view.php";



        return tap(ob_get_contents(), function () {

            ob_end_clean();

        });

    }
<?php         $this->sendContent();



        ob_end_clean();



        return $this->streamedContent;

    }
<?php     protected function handleViewException(Throwable $e, $obLevel)

    {

        while (ob_get_level() > $obLevel) {

            ob_end_clean();

        }



        throw $e;
<?php         ob_start();

        eval(Str::of($this->compiler->compileString($blade))->remove(['<?php', '?>']));

        $output = ob_get_contents();

        ob_end_clean();



        $this->assertSame($expectedOutput, $output);

    }
<?php         ob_start();

        eval(Str::of($this->compiler->compileString($blade))->remove(['<?php', '?>']));

        $output = ob_get_contents();

        ob_end_clean();



        $this->assertSame($expectedOutput, $output);

    }
<?php     protected function handleViewException(Throwable $baseException, $obLevel)

    {

        while (ob_get_level() > $obLevel) {

            ob_end_clean();

        }



        if ($baseException instanceof ViewException) {
<?php             $octaneResponse->response->sendContent();



            ob_end_clean();



            $swooleResponse->end();
<?php             $output = ob_get_contents();



            ob_end_clean();
<?php         imagejpeg($this->image->getCore(), null, $this->quality);

        $this->image->mime = image_type_to_mime_type(IMAGETYPE_JPEG);

        $buffer = ob_get_contents();

        ob_end_clean();



        return $buffer;

    }
<?php         imagepng($resource, null, -1);

        $this->image->mime = image_type_to_mime_type(IMAGETYPE_PNG);

        $buffer = ob_get_contents();

        ob_end_clean();



        return $buffer;

    }
<?php         imagegif($this->image->getCore());

        $this->image->mime = image_type_to_mime_type(IMAGETYPE_GIF);

        $buffer = ob_get_contents();

        ob_end_clean();



        return $buffer;

    }
<?php         imagewebp($this->image->getCore(), null, $this->quality);

        $this->image->mime = defined('IMAGETYPE_WEBP') ? image_type_to_mime_type(IMAGETYPE_WEBP) : 'image/webp';

        $buffer = ob_get_contents();

        ob_end_clean();

        

        return $buffer;

    }
<?php         imagebmp($this->image->getCore());

        $this->image->mime = defined('IMAGETYPE_BMP') ? image_type_to_mime_type(IMAGETYPE_BMP) : 'image/bmp';

        $buffer = ob_get_contents();

        ob_end_clean();

        

        return $buffer;

    }
<?php         ob_start();

        $result->getRoute()->getHandler()();

        $echoed = ob_get_contents();

        ob_end_clean();



        self::assertSame($message, $echoed);

    }
<?php         ob_start();

        $return = dump($var1);

        ob_end_clean();



        $this->assertEquals($var1, $return);

    }