- ob_get_clean: documentation ( source)
- ob_start: documentation ( source)
- ob_get_level: documentation ( source)
<?php
function callback($buffer, $status) {
return "callback $buffer";
}
ob_start( 'callback', 0, PHP_OUTPUT_HANDLER_FLUSHABLE | PHP_OUTPUT_HANDLER_REMOVABLE);
echo 'test';
echo ob_get_clean(); //this should not work as no CLEANABLE flag was set on ob_start
//ob_end_clean is ran as well
//ob_clean -> failed to delete buffer notice
echo "\n".ob_get_level();