blob: e97fd4542064f2c1c304eb3b44e7618093382e96 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--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==
|