1--TEST--
2ob_start(): Ensure unerasable buffer cannot be erased by ob_clean(), ob_end_clean() or ob_end_flush().
3--FILE--
4<?php
5function callback($string) {
6	static $callback_invocations;
7	$callback_invocations++;
8	return "[callback:$callback_invocations]$string\n";
9}
10
11ob_start('callback', 0, false);
12
13echo "All of the following calls will fail to clean/remove the topmost buffer:\n";
14var_dump(ob_clean());
15var_dump(ob_end_clean());
16var_dump(ob_end_flush());
17
18echo "The OB nesting will still be 1 level deep:\n";
19var_dump(ob_get_level());
20?>
21--EXPECTF--
22[callback:1]All of the following calls will fail to clean/remove the topmost buffer:
23
24Notice: ob_clean(): failed to delete buffer of callback (0) in %s on line 11
25bool(false)
26
27Notice: ob_end_clean(): failed to discard buffer of callback (0) in %s on line 12
28bool(false)
29
30Notice: ob_end_flush(): failed to send buffer of callback (0) in %s on line 13
31bool(false)
32The OB nesting will still be 1 level deep:
33int(1)
34