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
|
|
|
|
(
|
2010-03-11 10:24:29 +00:00
|
|
|
[0] => 1: yes
|
|
|
|
[1] => 4: !
|
2009-06-18 21:03:00 +00:00
|
|
|
|
2012-11-28 09:19:44 +00:00
|
|
|
[2] => 2: no
|
2010-03-11 10:24:29 +00:00
|
|
|
[3] => 0: yes!
|
2009-06-18 21:03:00 +00:00
|
|
|
|
2012-11-28 09:19:44 +00:00
|
|
|
[4] => 10: no
|
2010-03-11 10:24:29 +00:00
|
|
|
)
|