php-src/tests/output/ob_017.phpt

37 lines
453 B
Plaintext
Raw Normal View History

2009-06-18 21:03:00 +00:00
--TEST--
output buffering - stati
2013-03-16 12:11:00 +00:00
--INI--
opcache.optimization_level=0
2009-06-18 21:03:00 +00:00
--FILE--
<?php
$stati = array();
function oh($str, $flags) {
global $stati;
$stati[] = "$flags: $str";
return $str;
}
ob_start("oh", 3);
echo "yes";
echo "!\n";
ob_flush();
echo "no";
ob_clean();
echo "yes!\n";
echo "no";
ob_end_clean();
print_r($stati);
?>
--EXPECT--
yes!
yes!
Array
(
[0] => 1: yes
[1] => 4: !
2009-06-18 21:03:00 +00:00
[2] => 2: no
[3] => 0: yes!
2009-06-18 21:03:00 +00:00
[4] => 10: no
)