summaryrefslogtreecommitdiff
path: root/tests/output/ob_013.phpt
blob: e96de46a4b6ec323103a0b013bb84ab6572e6377 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
--TEST--
output buffering - handlers/status
--FILE--
<?php
function a($s){return $s;}
function b($s){return $s;}
function c($s){return $s;}
function d($s){return $s;}

ob_start();
ob_start('a');
ob_start('b');
ob_start('c');
ob_start('d');
ob_start();

echo "foo\n";

ob_flush();
ob_end_clean();
ob_flush();

print_r(ob_list_handlers());
print_r(ob_get_status());
print_r(ob_get_status(true));

?>
--EXPECTF--
foo
Array
(
    [0] => default output handler
    [1] => a
    [2] => b
    [3] => c
    [4] => d
)
Array
(
    [name] => d
    [type] => 1
    [flags] => 4209
    [level] => 4
    [chunk_size] => %d
    [buffer_size] => 16384
    [buffer_used] => 96
)
Array
(
    [0] => Array
        (
            [name] => default output handler
            [type] => 0
            [flags] => 112
            [level] => 0
            [chunk_size] => %d
            [buffer_size] => 16384
            [buffer_used] => 0
        )

    [1] => Array
        (
            [name] => a
            [type] => 1
            [flags] => 113
            [level] => 1
            [chunk_size] => %d
            [buffer_size] => 16384
            [buffer_used] => 0
        )

    [2] => Array
        (
            [name] => b
            [type] => 1
            [flags] => 113
            [level] => 2
            [chunk_size] => %d
            [buffer_size] => 16384
            [buffer_used] => 0
        )

    [3] => Array
        (
            [name] => c
            [type] => 1
            [flags] => 113
            [level] => 3
            [chunk_size] => %d
            [buffer_size] => 16384
            [buffer_used] => 4
        )

    [4] => Array
        (
            [name] => d
            [type] => 1
            [flags] => 4209
            [level] => 4
            [chunk_size] => %d
            [buffer_size] => 16384
            [buffer_used] => %d
        )

)