summaryrefslogtreecommitdiff
path: root/tests/output/ob_get_level_basic_001.phpt
blob: 65f3291355dfe2b567bcaca32b6e5661d81e5e15 (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
--TEST--
Test ob_get_level() function : basic functionality 
--FILE--
<?php
/* Prototype  : proto int ob_get_level(void)
 * Description: Return the nesting level of the output buffer 
 * Source code: main/output.c
 * Alias to functions: 
 */

echo "*** Testing ob_get_level() : basic functionality ***\n";

// Zero arguments
echo "\n-- Testing ob_get_level() function with Zero arguments --\n";
var_dump(ob_get_level());

ob_start();
var_dump(ob_get_level());

ob_start();
var_dump(ob_get_level());

ob_end_flush();
var_dump(ob_get_level());

ob_end_flush();
var_dump(ob_get_level());

ob_end_flush();
var_dump(ob_get_level());


echo "Done";
?>
--EXPECTF--
*** Testing ob_get_level() : basic functionality ***

-- Testing ob_get_level() function with Zero arguments --
int(0)
int(1)
int(2)
int(1)
int(0)

Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush in %s on line 26
int(0)
Done