php-src/tests/output/ob_start_basic_unerasable_001.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

23 lines
500 B
PHP

--TEST--
ob_start(): Ensure content of unerasable buffer can be accessed by ob_get_contents().
--FILE--
<?php
function callback($string) {
static $callback_invocations;
$callback_invocations++;
return "[callback:$callback_invocations]$string\n";
}
ob_start('callback', 0, false);
echo "This call will obtain the content:\n";
$str = ob_get_contents();
var_dump($str);
?>
==DONE==
--EXPECT--
[callback:1]This call will obtain the content:
string(35) "This call will obtain the content:
"
==DONE==