diff options
author | Robin Fernandes <robinf@php.net> | 2008-12-18 15:20:47 +0000 |
---|---|---|
committer | Robin Fernandes <robinf@php.net> | 2008-12-18 15:20:47 +0000 |
commit | 1355a8f433ecd079a34a89ed209efe2c36a0d5ad (patch) | |
tree | 446b8ba0fe6b5b87da12f1801ade8b00e3e413d9 /tests/output/ob_start_basic_unerasable_001.phpt | |
parent | ad6f6c9a52212b1bc2ad22d1309e485b38ac1155 (diff) | |
download | php-git-1355a8f433ecd079a34a89ed209efe2c36a0d5ad.tar.gz |
Additional output buffering tests.
Diffstat (limited to 'tests/output/ob_start_basic_unerasable_001.phpt')
-rw-r--r-- | tests/output/ob_start_basic_unerasable_001.phpt | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/output/ob_start_basic_unerasable_001.phpt b/tests/output/ob_start_basic_unerasable_001.phpt new file mode 100644 index 0000000000..8e7280edda --- /dev/null +++ b/tests/output/ob_start_basic_unerasable_001.phpt @@ -0,0 +1,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== +--EXPECTF-- +[callback:1]This call will obtain the content: +string(35) "This call will obtain the content: +" +==DONE==
\ No newline at end of file |