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 EOTXT;

        ob_start();

        var_dump($clone);

        $this->assertStringMatchesFormat(str_replace('"1"', '1', $expected), ob_get_clean());

    }



    public function testCaster()
<?php         ob_start();

        $dumper->dump($data);

        $out = ob_get_clean();

        $out = preg_replace('/[ \t]+$/m', '', $out);

        $intMax = \PHP_INT_MAX;

        $res = (int) $var['res'];
<?php         ob_start();

        $dumper->dump($data);

        $out = ob_get_clean();

        $res = (int) $var;



        $this->assertStringMatchesFormat(
<?php         ob_start();

        $dumper->dump($data);

        $out = ob_get_clean();



        $this->assertStringContainsString("\e]8;;{$href}\e\\\e[", $out);

        $this->assertStringContainsString("m{$var}\e[", $out);
<?php         ob_start();

        $dumper->dump($data);

        $out = ob_get_clean();

        $out = preg_replace('/[ \t]+$/m', '', $out);

        $var['file'] = htmlspecialchars($var['file'], \ENT_QUOTES, 'UTF-8');

        $intMax = \PHP_INT_MAX;
<?php         ob_start();

        $dumper->dump($cloner->cloneVar($var));

        $out = ob_get_clean();



        $this->assertStringContainsString($needle, $out);

    }