1--TEST--
2Test ob_clean() function : basic functionality
3--FILE--
4<?php
5/* Prototype  : proto bool ob_clean(void)
6 * Description: Clean (delete) the current output buffer
7 * Source code: main/output.c
8 * Alias to functions:
9 */
10
11echo "*** Testing ob_clean() : basic functionality ***\n";
12
13// Zero arguments
14echo "\n-- Testing ob_clean() function with Zero arguments --\n";
15var_dump( ob_clean() );
16
17ob_start();
18echo "You should never see this.";
19var_dump(ob_clean());
20
21echo "Ensure the buffer is still active after the clean.";
22$out = ob_get_clean();
23var_dump($out);
24
25echo "Done";
26?>
27--EXPECTF--
28*** Testing ob_clean() : basic functionality ***
29
30-- Testing ob_clean() function with Zero arguments --
31
32Notice: ob_clean(): failed to delete buffer. No buffer to delete in %s on line 12
33bool(false)
34string(61) "bool(true)
35Ensure the buffer is still active after the clean."
36Done
37