summaryrefslogtreecommitdiff
path: root/tests/output/ob_017.phpt
blob: 517fafe9915c495d925b0ab87e61bdd8bc9a9087 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--TEST--
output buffering - stati
--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: !

    [2] => 2: no
    [3] => 0: yes!

    [4] => 10: no
)