20#define PHP_OUTPUT_NEWAPI 1
23#define PHP_OUTPUT_HANDLER_WRITE 0x00
24#define PHP_OUTPUT_HANDLER_START 0x01
25#define PHP_OUTPUT_HANDLER_CLEAN 0x02
26#define PHP_OUTPUT_HANDLER_FLUSH 0x04
27#define PHP_OUTPUT_HANDLER_FINAL 0x08
28#define PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_WRITE
29#define PHP_OUTPUT_HANDLER_END PHP_OUTPUT_HANDLER_FINAL
32#define PHP_OUTPUT_HANDLER_INTERNAL 0x0000
33#define PHP_OUTPUT_HANDLER_USER 0x0001
36#define PHP_OUTPUT_HANDLER_CLEANABLE 0x0010
37#define PHP_OUTPUT_HANDLER_FLUSHABLE 0x0020
38#define PHP_OUTPUT_HANDLER_REMOVABLE 0x0040
39#define PHP_OUTPUT_HANDLER_STDFLAGS 0x0070
42#define PHP_OUTPUT_HANDLER_STARTED 0x1000
43#define PHP_OUTPUT_HANDLER_DISABLED 0x2000
44#define PHP_OUTPUT_HANDLER_PROCESSED 0x4000
46#define PHP_OUTPUT_HANDLER_ABILITY_FLAGS(bitmask) ((bitmask) & ~0xf00f)
56#define PHP_OUTPUT_POP_TRY 0x000
57#define PHP_OUTPUT_POP_FORCE 0x001
58#define PHP_OUTPUT_POP_DISCARD 0x010
59#define PHP_OUTPUT_POP_SILENT 0x100
62#define PHP_OUTPUT_IMPLICITFLUSH 0x01
63#define PHP_OUTPUT_DISABLED 0x02
64#define PHP_OUTPUT_WRITTEN 0x04
65#define PHP_OUTPUT_SENT 0x08
67#define PHP_OUTPUT_ACTIVE 0x10
68#define PHP_OUTPUT_LOCKED 0x20
70#define PHP_OUTPUT_ACTIVATED 0x100000
83#define PHP_OUTPUT_HANDLER_INITBUF_SIZE(s) \
85 (s) + PHP_OUTPUT_HANDLER_ALIGNTO_SIZE - ((s) % (PHP_OUTPUT_HANDLER_ALIGNTO_SIZE)) : \
86 PHP_OUTPUT_HANDLER_DEFAULT_SIZE \
88#define PHP_OUTPUT_HANDLER_ALIGNTO_SIZE 0x1000
89#define PHP_OUTPUT_HANDLER_DEFAULT_SIZE 0x4000
114typedef struct _php_output_handler *(*php_output_handler_alias_ctor_t)(
const char *handler_name,
size_t handler_name_len,
size_t chunk_size,
int flags);
151# define OG(v) ZEND_TSRMG(output_globals_id, zend_output_globals *, v)
153# define OG(v) (output_globals.v)
157#define PHPWRITE(str, str_len) php_output_write((str), (str_len))
158#define PHPWRITE_H(str, str_len) php_output_write_unbuffered((str), (str_len))
160#define PUTC(c) php_output_write((const char *) &(c), 1)
161#define PUTC_H(c) php_output_write_unbuffered((const char *) &(c), 1)
163#define PUTS(str) do { \
164 const char *__str = (str); \
165 php_output_write(__str, strlen(__str)); \
167#define PUTS_H(str) do { \
168 const char *__str = (str); \
169 php_output_write_unbuffered(__str, strlen(__str)); \
175extern const
char php_output_default_handler_name[
sizeof(
"default output handler")];
178#define php_output_tearup() \
179 php_output_startup(); \
180 php_output_activate()
181#define php_output_teardown() \
182 php_output_end_all(); \
183 php_output_deactivate(); \
184 php_output_shutdown()
sizeof(Countable|array $value, int $mode=COUNT_NORMAL)
php_output_handler * active
PHPAPI zend_result php_output_handler_hook(php_output_handler_hook_t type, void *arg)
PHPAPI php_output_handler * php_output_handler_create_internal(const char *name, size_t name_len, php_output_handler_context_func_t handler, size_t chunk_size, int flags)
PHPAPI void php_output_handler_dtor(php_output_handler *handler)
_php_output_handler_status_t
@ PHP_OUTPUT_HANDLER_FAILURE
@ PHP_OUTPUT_HANDLER_SUCCESS
@ PHP_OUTPUT_HANDLER_NO_DATA
enum _php_output_handler_status_t php_output_handler_status_t
PHPAPI void php_output_end_all(void)
PHPAPI bool php_output_handler_conflict(const char *handler_new, size_t handler_new_len, const char *handler_set, size_t handler_set_len)
PHPAPI int php_output_activate(void)
PHPAPI zend_result php_output_start_devnull(void)
zend_string * output_start_filename
PHPAPI bool php_output_handler_started(const char *name, size_t name_len)
PHPAPI zend_result php_output_handler_reverse_conflict_register(const char *handler_name, size_t handler_name_len, php_output_handler_conflict_check_t check_func)
PHPAPI void php_output_flush_all(void)
PHPAPI void php_output_set_status(int status)
struct _php_output_handler php_output_handler
php_output_handler * running
enum _php_output_handler_hook_t php_output_handler_hook_t
PHPAPI zend_result php_output_start_user(zval *output_handler, size_t chunk_size, int flags)
PHPAPI zend_result php_output_get_length(zval *p)
PHPAPI void php_output_discard_all(void)
const char php_output_devnull_handler_name[sizeof("null output handler")]
PHPAPI const char * php_output_get_start_filename(void)
PHPAPI size_t php_output_write_unbuffered(const char *str, size_t len)
_php_output_handler_hook_t
@ PHP_OUTPUT_HANDLER_HOOK_GET_LEVEL
@ PHP_OUTPUT_HANDLER_HOOK_DISABLE
@ PHP_OUTPUT_HANDLER_HOOK_GET_FLAGS
@ PHP_OUTPUT_HANDLER_HOOK_GET_OPAQ
@ PHP_OUTPUT_HANDLER_HOOK_LAST
@ PHP_OUTPUT_HANDLER_HOOK_IMMUTABLE
PHPAPI zend_result php_output_handler_conflict_register(const char *handler_name, size_t handler_name_len, php_output_handler_conflict_check_t check_func)
PHPAPI php_output_handler_alias_ctor_t php_output_handler_alias(const char *handler_name, size_t handler_name_len)
PHPAPI void php_output_shutdown(void)
PHPAPI zend_result php_output_discard(void)
PHPAPI size_t php_output_write(const char *str, size_t len)
struct _php_output_buffer php_output_buffer
void(* php_output_handler_context_dtor_t)(void *opaq)
PHPAPI void php_output_set_implicit_flush(int flush)
PHPAPI void php_output_handler_free(php_output_handler **handler)
PHPAPI zend_result php_output_end(void)
PHPAPI php_output_handler * php_output_get_active_handler(void)
struct _php_output_handler_user_func_t php_output_handler_user_func_t
PHPAPI int php_output_get_level(void)
struct _php_output_context php_output_context
zend_result(* php_output_handler_context_func_t)(void **handler_context, php_output_context *output_context)
PHPAPI zend_result php_output_start_internal(const char *name, size_t name_len, php_output_handler_func_t output_handler, size_t chunk_size, int flags)
PHPAPI zend_result php_output_clean(void)
PHPAPI zend_result php_output_start_default(void)
struct _php_output_handler *(* php_output_handler_alias_ctor_t)(const char *handler_name, size_t handler_name_len, size_t chunk_size, int flags)
PHPAPI void php_output_clean_all(void)
PHPAPI zend_result php_output_handler_start(php_output_handler *handler)
PHPAPI zend_result php_output_handler_alias_register(const char *handler_name, size_t handler_name_len, php_output_handler_alias_ctor_t func)
PHPAPI int php_output_get_start_lineno(void)
PHPAPI int php_output_get_status(void)
PHPAPI void php_output_startup(void)
zend_result(* php_output_handler_conflict_check_t)(const char *handler_name, size_t handler_name_len)
PHPAPI void php_output_handler_set_context(php_output_handler *handler, void *opaq, void(*dtor)(void *))
PHPAPI zend_result php_output_get_contents(zval *p)
void(* php_output_handler_func_t)(char *output, size_t output_len, char **handled_output, size_t *handled_output_len, int mode)
PHPAPI zend_result php_output_flush(void)
PHPAPI php_output_handler * php_output_handler_create_user(zval *handler, size_t chunk_size, int flags)
PHPAPI void php_output_deactivate(void)
zend_fcall_info_cache fcc
php_output_handler_user_func_t * user
php_output_handler_context_func_t internal
struct _zend_fcall_info_cache zend_fcall_info_cache
#define ZEND_END_MODULE_GLOBALS(module_name)
struct _zend_fcall_info zend_fcall_info
#define ZEND_EXTERN_MODULE_GLOBALS(module_name)
#define ZEND_BEGIN_MODULE_GLOBALS(module_name)
ZEND_API void(ZEND_FASTCALL *zend_touch_vm_stack_data)(void *vm_stack_data)
struct _zend_string zend_string
struct _zend_stack zend_stack
ZEND_RESULT_CODE zend_result
fbc internal_function handler(call, ret)