xref: /PHP-5.3/tests/output/ob_013.phpt (revision af49e58f)
1--TEST--
2output buffering - handlers/status
3--FILE--
4<?php
5function a($s){return $s;}
6function b($s){return $s;}
7function c($s){return $s;}
8function d($s){return $s;}
9
10ob_start();
11ob_start('a');
12ob_start('b');
13ob_start('c');
14ob_start('d');
15ob_start();
16
17echo "foo\n";
18
19ob_flush();
20ob_end_clean();
21ob_flush();
22
23print_r(ob_list_handlers());
24print_r(ob_get_status());
25print_r(ob_get_status(true));
26
27?>
28--EXPECTF--
29foo
30Array
31(
32    [0] => default output handler
33    [1] => a
34    [2] => b
35    [3] => c
36    [4] => d
37)
38Array
39(
40    [level] => 5
41    [type] => 1
42    [status] => 1
43    [name] => d
44    [del] => 1
45)
46Array
47(
48    [0] => Array
49        (
50            [chunk_size] => 0
51            [size] => 40960
52            [block_size] => 10240
53            [type] => 1
54            [status] => 0
55            [name] => default output handler
56            [del] => 1
57        )
58
59    [1] => Array
60        (
61            [chunk_size] => 0
62            [size] => 40960
63            [block_size] => 10240
64            [type] => 1
65            [status] => 0
66            [name] => a
67            [del] => 1
68        )
69
70    [2] => Array
71        (
72            [chunk_size] => 0
73            [size] => 40960
74            [block_size] => 10240
75            [type] => 1
76            [status] => 0
77            [name] => b
78            [del] => 1
79        )
80
81    [3] => Array
82        (
83            [chunk_size] => 0
84            [size] => 40960
85            [block_size] => 10240
86            [type] => 1
87            [status] => 0
88            [name] => c
89            [del] => 1
90        )
91
92    [4] => Array
93        (
94            [chunk_size] => 0
95            [size] => 40960
96            [block_size] => 10240
97            [type] => 1
98            [status] => 1
99            [name] => d
100            [del] => 1
101        )
102
103)