How to end a callback call ob_starton a call *_clean().
ob_start(function($buffer, $phase){
}, 0, PHP_OUTPUT_HANDLER_FLUSHABLE | PHP_OUTPUT_HANDLER_REMOVABLE);
Does not prevent calls from starting ob_end_clean, ob_get_cleanor ob_clean. I expect a notification that the buffer has not been started with the correct flag PHP_OUTPUT_HANDLER_CLEANABLE
according to the docs .
As for the constants PHP_OUTPUT_HANDLER_*, I did not find a suitable man page where the parameter is explained $phaseand the groups of bits related to these constants are detailed. Even the actual names / values ββthat I had to get from the global CONSTANTS variable.
PHP_OUTPUT_HANDLER_START
PHP_OUTPUT_HANDLER_WRITE
PHP_OUTPUT_HANDLER_FLUSH
PHP_OUTPUT_HANDLER_CLEAN
PHP_OUTPUT_HANDLER_FINAL
PHP_OUTPUT_HANDLER_CONT
PHP_OUTPUT_HANDLER_END
PHP_OUTPUT_HANDLER_CLEANABLE
PHP_OUTPUT_HANDLER_FLUSHABLE
PHP_OUTPUT_HANDLER_REMOVABLE
PHP_OUTPUT_HANDLER_STDFLAGS
PHP_OUTPUT_HANDLER_STARTED
PHP_OUTPUT_HANDLER_DISABLED
, , . $phase ( printf, echo, ob_start ).
, , :
: