summaryrefslogtreecommitdiff
path: root/tests/output/ob_013.phpt
blob: ce5b5e545592c33bc511e0a2d85cb6532895cd7d (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
--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
(
    [level] => 5
    [type] => 1
    [status] => 1
    [name] => d
    [del] => 1
)
Array
(
    [0] => Array
        (
            [chunk_size] => 0
            [size] => 40960
            [block_size] => 10240
            [type] => 1
            [status] => 0
            [name] => default output handler
            [del] => 1
        )

    [1] => Array
        (
            [chunk_size] => 0
            [size] => 40960
            [block_size] => 10240
            [type] => 1
            [status] => 0
            [name] => a
            [del] => 1
        )

    [2] => Array
        (
            [chunk_size] => 0
            [size] => 40960
            [block_size] => 10240
            [type] => 1
            [status] => 0
            [name] => b
            [del] => 1
        )

    [3] => Array
        (
            [chunk_size] => 0
            [size] => 40960
            [block_size] => 10240
            [type] => 1
            [status] => 0
            [name] => c
            [del] => 1
        )

    [4] => Array
        (
            [chunk_size] => 0
            [size] => 40960
            [block_size] => 10240
            [type] => 1
            [status] => 1
            [name] => d
            [del] => 1
        )

)