From 7ff0cda859574186318a82dc57055ed774780e89 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 19:35:22 +0000 Subject: [PATCH 01/10] feat(gen): make the symbols manifest thread-safety-aware and add the zts target On ZTS builds executor_globals/compiler_globals are not linkable symbols - the engine exports the TSRM byte offsets instead (Zend/zend_globals.h), and tsrm_get_ls_cache() is the exported accessor for the calling thread's local-storage block. The manifest now selects the right symbol set for the build emit.php runs under, and the generator maintains both 8.4 targets. Part of #60 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019mWPLkDoKWoDDS9W9LSaDa --- tools/generator/generate.php | 1 + tools/generator/symbols.php | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tools/generator/generate.php b/tools/generator/generate.php index 6651d7e..2de5f46 100644 --- a/tools/generator/generate.php +++ b/tools/generator/generate.php @@ -24,6 +24,7 @@ */ $defaultTargets = [ ['php' => '8.4', 'ts' => 'nts'], + ['php' => '8.4', 'ts' => 'zts'], ]; $options = getopt('', ['php:', 'ts:']); diff --git a/tools/generator/symbols.php b/tools/generator/symbols.php index e938d69..0057532 100644 --- a/tools/generator/symbols.php +++ b/tools/generator/symbols.php @@ -148,11 +148,22 @@ // PHP static and therefore request-scoped). Used by Core::persistentFree for // persistent blocks minted by z-engine or by the engine's pemalloc(..., 1). 'free', + // TSRM (ZTS builds only): the exported accessor for the calling thread's + // local-storage block. EG/CG live at tsrm_get_ls_cache() + *_globals_offset - + // the same fast path the engine's own EG()/CG() macros compile to (issue #60). + ...(ZEND_THREAD_SAFE ? ['tsrm_get_ls_cache'] : []), ], 'variables' => [ - 'executor_globals', - 'compiler_globals', + // EG/CG storage: plain extern symbols on NTS; on ZTS the globals are + // per-thread and only the TSRM byte offsets are exported + // (Zend/zend_globals.h) - the structs are reached through + // tsrm_get_ls_cache(). The _id resource ids are deliberately not + // exported: the offsets path never needs them, and the __thread TLS + // cache variable itself cannot be bound by FFI at all. + ...(ZEND_THREAD_SAFE + ? ['executor_globals_offset', 'compiler_globals_offset'] + : ['executor_globals', 'compiler_globals']), 'module_registry', 'std_object_handlers', 'zend_ast_process', From 439b0f4881b29981fa620531d9964f916fa20636 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 19:35:22 +0000 Subject: [PATCH 02/10] chore(gen): add generated PHP 8.4 linux-x64-zts engine definitions Generated with the documented Docker-free host pipeline (AGENTS.md) under a release --enable-zts build of PHP 8.4.24, after the mandatory byte-identity pre-check reproduced the committed NTS artifacts exactly (before and after the manifest change - the committed NTS artifacts are untouched). The emit pipeline's FFI validation stage verified all 39 struct layouts against the C compiler under the ZTS interpreter. Part of #60 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019mWPLkDoKWoDDS9W9LSaDa --- include/8.4/linux-x64-zts/constants.php | 522 ++++++++ include/8.4/linux-x64-zts/engine.h | 1155 +++++++++++++++++ include/8.4/linux-x64-zts/layouts.json | 682 ++++++++++ include/8.4/linux-x64-zts/probe.c | 1525 +++++++++++++++++++++++ 4 files changed, 3884 insertions(+) create mode 100644 include/8.4/linux-x64-zts/constants.php create mode 100644 include/8.4/linux-x64-zts/engine.h create mode 100644 include/8.4/linux-x64-zts/layouts.json create mode 100644 include/8.4/linux-x64-zts/probe.c diff --git a/include/8.4/linux-x64-zts/constants.php b/include/8.4/linux-x64-zts/constants.php new file mode 100644 index 0000000..9197dc0 --- /dev/null +++ b/include/8.4/linux-x64-zts/constants.php @@ -0,0 +1,522 @@ + 1, + 'ZEND_ACC_PROTECTED' => 2, + 'ZEND_ACC_PRIVATE' => 4, + 'ZEND_ACC_CHANGED' => 8, + 'ZEND_ACC_STATIC' => 16, + 'ZEND_ACC_ABSTRACT' => 64, + 'ZEND_ACC_FINAL' => 32, + 'ZEND_ACC_DEPRECATED' => 2048, + 'ZEND_ACC_INTERFACE' => 1, + 'ZEND_ACC_TRAIT' => 2, + 'ZEND_ACC_ANON_CLASS' => 4, + 'ZEND_ACC_ENUM' => 268435456, + 'ZEND_ACC_IMPLICIT_ABSTRACT_CLASS' => 16, + 'ZEND_ACC_LINKED' => 8, + 'ZEND_ACC_IMMUTABLE' => 128, + 'ZEND_ACC_USE_GUARDS' => 2048, + 'ZEND_ACC_CONSTANTS_UPDATED' => 4096, + 'ZEND_ACC_NO_DYNAMIC_PROPERTIES' => 8192, + 'ZEND_HAS_STATIC_IN_METHODS' => 16384, + 'ZEND_ACC_TOP_LEVEL' => 512, + 'ZEND_ACC_PRELOADED' => 1024, + 'ZEND_ACC_NOT_SERIALIZABLE' => 536870912, + 'ZEND_ACC_READONLY_CLASS' => 65536, + 'ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES' => 32768, + 'ZEND_ACC_UNRESOLVED_VARIANCE' => 524288, + 'ZEND_ACC_NEARLY_LINKED' => 1048576, + 'ZEND_ACC_RESOLVED_PARENT' => 131072, + 'ZEND_ACC_RESOLVED_INTERFACES' => 262144, + 'ZEND_ACC_EXPLICIT_ABSTRACT_CLASS' => 64, + 'ZEND_ACC_READONLY' => 128, + 'ZEND_ACC_VIRTUAL' => 512, + 'ZEND_ACC_FAKE_CLOSURE' => 8388608, + 'ZEND_ACC_UNINSTANTIABLE' => 268435539, + 'ZEND_ACC_CALL_VIA_TRAMPOLINE' => 262144, + 'ZEND_ACC_NEVER_CACHE' => 524288, + 'ZEND_ACC_TRAIT_CLONE' => 1048576, + 'ZEND_ACC_RETURN_REFERENCE' => 4096, + 'ZEND_ACC_DONE_PASS_TWO' => 33554432, + 'ZEND_ACC_HEAP_RT_CACHE' => 67108864, + 'ZEND_ACC_STRICT_TYPES' => 2147483648, + 'ZEND_ACC_CLOSURE' => 4194304, + 'ZEND_ACC_GENERATOR' => 16777216, + 'ZEND_ACC_HAS_FINALLY_BLOCK' => 32768, + 'ZEND_ACC_EARLY_BINDING' => 65536, + 'ZEND_ACC_USES_THIS' => 131072, + 'ZEND_ACC_CTOR' => 2097152, + 'ZEND_ACC_HAS_TYPE_HINTS' => 256, + 'ZEND_ACC_HAS_RETURN_TYPE' => 8192, + 'ZEND_ACC_VARIADIC' => 16384, + 'ZEND_ACC_CACHED' => 4194304, + 'ZEND_ACC_FILE_CACHED' => 134217728, + 'ZEND_ACC_ARENA_ALLOCATED' => 33554432, + '_ZEND_TYPE_EXTRA_FLAGS_SHIFT' => 25, + '_ZEND_TYPE_MASK' => 33554431, + '_ZEND_TYPE_NAME_BIT' => 16777216, + '_ZEND_TYPE_LITERAL_NAME_BIT' => 8388608, + '_ZEND_TYPE_LIST_BIT' => 4194304, + '_ZEND_TYPE_KIND_MASK' => 29360128, + '_ZEND_TYPE_ITERABLE_BIT' => 2097152, + '_ZEND_TYPE_ARENA_BIT' => 1048576, + '_ZEND_TYPE_INTERSECTION_BIT' => 524288, + '_ZEND_TYPE_UNION_BIT' => 262144, + '_ZEND_TYPE_NULLABLE_BIT' => 2, + '_ZEND_TYPE_MAY_BE_MASK' => 262143, + 'IS_UNDEF' => 0, + 'IS_NULL' => 1, + 'IS_FALSE' => 2, + 'IS_TRUE' => 3, + 'IS_LONG' => 4, + 'IS_DOUBLE' => 5, + 'IS_STRING' => 6, + 'IS_ARRAY' => 7, + 'IS_OBJECT' => 8, + 'IS_RESOURCE' => 9, + 'IS_REFERENCE' => 10, + 'IS_CONSTANT_AST' => 11, + 'IS_CALLABLE' => 12, + 'IS_ITERABLE' => 13, + 'IS_VOID' => 14, + 'IS_STATIC' => 15, + 'IS_MIXED' => 16, + 'IS_NEVER' => 17, + 'IS_INDIRECT' => 12, + 'IS_PTR' => 13, + 'IS_ALIAS_PTR' => 14, + '_IS_ERROR' => 15, + '_IS_BOOL' => 18, + '_IS_NUMBER' => 19, + 'IS_TYPE_REFCOUNTED' => 1, + 'IS_TYPE_COLLECTABLE' => 2, + 'Z_TYPE_MASK' => 255, + 'Z_TYPE_FLAGS_MASK' => 65280, + 'Z_TYPE_FLAGS_SHIFT' => 8, + 'GC_TYPE_MASK' => 15, + 'GC_FLAGS_MASK' => 1008, + 'GC_INFO_MASK' => 4294966272, + 'GC_FLAGS_SHIFT' => 0, + 'GC_INFO_SHIFT' => 10, + 'GC_NULL' => 17, + 'GC_STRING' => 22, + 'GC_ARRAY' => 7, + 'GC_OBJECT' => 8, + 'GC_RESOURCE' => 25, + 'GC_REFERENCE' => 26, + 'GC_CONSTANT_AST' => 27, + 'GC_NOT_COLLECTABLE' => 16, + 'GC_PROTECTED' => 32, + 'GC_IMMUTABLE' => 64, + 'GC_PERSISTENT' => 128, + 'GC_PERSISTENT_LOCAL' => 256, + 'IS_STR_CLASS_NAME_MAP_PTR' => 32, + 'IS_STR_INTERNED' => 64, + 'IS_STR_PERSISTENT' => 128, + 'IS_STR_PERMANENT' => 256, + 'IS_STR_VALID_UTF8' => 512, + 'IS_ARRAY_IMMUTABLE' => 64, + 'IS_ARRAY_PERSISTENT' => 128, + 'IS_OBJ_WEAKLY_REFERENCED' => 128, + 'IS_OBJ_DESTRUCTOR_CALLED' => 256, + 'IS_OBJ_FREE_CALLED' => 512, + 'IS_OBJ_LAZY_UNINITIALIZED' => 2147483648, + 'IS_OBJ_LAZY_PROXY' => 1073741824, + 'HASH_FLAG_CONSISTENCY' => 3, + 'HASH_FLAG_PACKED' => 4, + 'HASH_FLAG_UNINITIALIZED' => 8, + 'HASH_FLAG_STATIC_KEYS' => 16, + 'HASH_FLAG_HAS_EMPTY_IND' => 32, + 'HASH_FLAG_ALLOW_COW_VIOLATION' => 64, + 'HASH_UPDATE' => 1, + 'HASH_ADD' => 2, + 'HASH_UPDATE_INDIRECT' => 4, + 'HASH_ADD_NEW' => 8, + 'HASH_ADD_NEXT' => 16, + 'HT_MIN_MASK' => 4294967294, + 'HT_MIN_SIZE' => 8, + 'ZEND_MODULE_API_NO' => 20240924, + 'MODULE_PERSISTENT' => 1, + 'MODULE_TEMPORARY' => 2, + 'CONST_CS' => 0, + 'CONST_PERSISTENT' => 1, + 'CONST_NO_FILE_CACHE' => 2, + 'CONST_DEPRECATED' => 4, + 'CONST_OWNED' => 8, + 'CONST_RECURSIVE' => 16, + 'PHP_USER_CONSTANT' => 8388607, + 'ZEND_DEBUG' => 0, + 'ZEND_MM_ALIGNMENT' => 8, + 'ZEND_MAX_RESERVED_RESOURCES' => 6, + 'ZEND_INTERNAL_FUNCTION' => 1, + 'ZEND_USER_FUNCTION' => 2, + 'ZEND_EVAL_CODE' => 4, + 'ZEND_COMPILE_EXTENDED_STMT' => 1, + 'ZEND_COMPILE_EXTENDED_FCALL' => 2, + 'ZEND_COMPILE_EXTENDED_INFO' => 3, + 'ZEND_COMPILE_HANDLE_OP_ARRAY' => 4, + 'ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS' => 8, + 'ZEND_COMPILE_DELAYED_BINDING' => 32, + 'ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION' => 64, + 'ZEND_COMPILE_IGNORE_INTERNAL_CLASSES' => 16, + 'ZEND_COMPILE_IGNORE_USER_FUNCTIONS' => 512, + 'ZEND_COMPILE_GUARDS' => 1024, + 'ZEND_COMPILE_NO_BUILTINS' => 2048, + 'ZEND_COMPILE_NO_JUMPTABLES' => 65536, + 'ZEND_COMPILE_PRELOAD' => 32768, + 'ZEND_COMPILE_PRELOAD_IN_CHILD' => 131072, + 'ZEND_COMPILE_WITHOUT_EXECUTION' => 16384, + 'ZEND_CALL_FUNCTION' => 0, + 'ZEND_CALL_CODE' => 65536, + 'ZEND_CALL_NESTED' => 0, + 'ZEND_CALL_TOP' => 131072, + 'ZEND_CALL_HAS_THIS' => 776, + 'ZEND_CALL_FAKE_CLOSURE' => 8388608, + 'ZEND_CALL_CLOSURE' => 4194304, + 'ZEND_CALL_HAS_SYMBOL_TABLE' => 1048576, + 'ZEND_ATTRIBUTE_TARGET_CLASS' => 1, + 'ZEND_ATTRIBUTE_TARGET_FUNCTION' => 2, + 'ZEND_ATTRIBUTE_TARGET_METHOD' => 4, + 'ZEND_ATTRIBUTE_TARGET_PROPERTY' => 8, + 'ZEND_ATTRIBUTE_TARGET_CLASS_CONST' => 16, + 'ZEND_ATTRIBUTE_TARGET_PARAMETER' => 32, + 'ZEND_ATTRIBUTE_TARGET_ALL' => 63, + 'ZEND_ATTRIBUTE_IS_REPEATABLE' => 64, + 'ZEND_ATTRIBUTE_FLAGS' => 127, + 'ZEND_AST_ZVAL' => 64, + 'ZEND_AST_CONSTANT' => 65, + 'ZEND_AST_ZNODE' => 66, + 'ZEND_AST_FUNC_DECL' => 67, + 'ZEND_AST_CLOSURE' => 68, + 'ZEND_AST_METHOD' => 69, + 'ZEND_AST_CLASS' => 70, + 'ZEND_AST_ARROW_FUNC' => 71, + 'ZEND_AST_PROPERTY_HOOK' => 72, + 'ZEND_AST_ARG_LIST' => 128, + 'ZEND_AST_ARRAY' => 129, + 'ZEND_AST_ENCAPS_LIST' => 130, + 'ZEND_AST_EXPR_LIST' => 131, + 'ZEND_AST_STMT_LIST' => 132, + 'ZEND_AST_IF' => 133, + 'ZEND_AST_SWITCH_LIST' => 134, + 'ZEND_AST_CATCH_LIST' => 135, + 'ZEND_AST_PARAM_LIST' => 136, + 'ZEND_AST_CLOSURE_USES' => 137, + 'ZEND_AST_PROP_DECL' => 138, + 'ZEND_AST_CONST_DECL' => 139, + 'ZEND_AST_CLASS_CONST_DECL' => 140, + 'ZEND_AST_NAME_LIST' => 141, + 'ZEND_AST_TRAIT_ADAPTATIONS' => 142, + 'ZEND_AST_USE' => 143, + 'ZEND_AST_TYPE_UNION' => 144, + 'ZEND_AST_TYPE_INTERSECTION' => 145, + 'ZEND_AST_ATTRIBUTE_LIST' => 146, + 'ZEND_AST_ATTRIBUTE_GROUP' => 147, + 'ZEND_AST_MATCH_ARM_LIST' => 148, + 'ZEND_AST_MODIFIER_LIST' => 149, + 'ZEND_AST_MAGIC_CONST' => 0, + 'ZEND_AST_TYPE' => 1, + 'ZEND_AST_CONSTANT_CLASS' => 2, + 'ZEND_AST_CALLABLE_CONVERT' => 3, + 'ZEND_AST_VAR' => 256, + 'ZEND_AST_CONST' => 257, + 'ZEND_AST_UNPACK' => 258, + 'ZEND_AST_UNARY_PLUS' => 259, + 'ZEND_AST_UNARY_MINUS' => 260, + 'ZEND_AST_CAST' => 261, + 'ZEND_AST_EMPTY' => 262, + 'ZEND_AST_ISSET' => 263, + 'ZEND_AST_SILENCE' => 264, + 'ZEND_AST_SHELL_EXEC' => 265, + 'ZEND_AST_CLONE' => 266, + 'ZEND_AST_EXIT' => 267, + 'ZEND_AST_PRINT' => 268, + 'ZEND_AST_INCLUDE_OR_EVAL' => 269, + 'ZEND_AST_UNARY_OP' => 270, + 'ZEND_AST_PRE_INC' => 271, + 'ZEND_AST_PRE_DEC' => 272, + 'ZEND_AST_POST_INC' => 273, + 'ZEND_AST_POST_DEC' => 274, + 'ZEND_AST_YIELD_FROM' => 275, + 'ZEND_AST_CLASS_NAME' => 276, + 'ZEND_AST_GLOBAL' => 277, + 'ZEND_AST_UNSET' => 278, + 'ZEND_AST_RETURN' => 279, + 'ZEND_AST_LABEL' => 280, + 'ZEND_AST_REF' => 281, + 'ZEND_AST_HALT_COMPILER' => 282, + 'ZEND_AST_ECHO' => 283, + 'ZEND_AST_THROW' => 284, + 'ZEND_AST_GOTO' => 285, + 'ZEND_AST_BREAK' => 286, + 'ZEND_AST_CONTINUE' => 287, + 'ZEND_AST_PROPERTY_HOOK_SHORT_BODY' => 288, + 'ZEND_AST_DIM' => 512, + 'ZEND_AST_PROP' => 513, + 'ZEND_AST_NULLSAFE_PROP' => 514, + 'ZEND_AST_STATIC_PROP' => 515, + 'ZEND_AST_CALL' => 516, + 'ZEND_AST_CLASS_CONST' => 517, + 'ZEND_AST_ASSIGN' => 518, + 'ZEND_AST_ASSIGN_REF' => 519, + 'ZEND_AST_ASSIGN_OP' => 520, + 'ZEND_AST_BINARY_OP' => 521, + 'ZEND_AST_GREATER' => 522, + 'ZEND_AST_GREATER_EQUAL' => 523, + 'ZEND_AST_AND' => 524, + 'ZEND_AST_OR' => 525, + 'ZEND_AST_ARRAY_ELEM' => 526, + 'ZEND_AST_NEW' => 527, + 'ZEND_AST_INSTANCEOF' => 528, + 'ZEND_AST_YIELD' => 529, + 'ZEND_AST_COALESCE' => 530, + 'ZEND_AST_ASSIGN_COALESCE' => 531, + 'ZEND_AST_STATIC' => 532, + 'ZEND_AST_WHILE' => 533, + 'ZEND_AST_DO_WHILE' => 534, + 'ZEND_AST_IF_ELEM' => 535, + 'ZEND_AST_SWITCH' => 536, + 'ZEND_AST_SWITCH_CASE' => 537, + 'ZEND_AST_DECLARE' => 538, + 'ZEND_AST_USE_TRAIT' => 539, + 'ZEND_AST_TRAIT_PRECEDENCE' => 540, + 'ZEND_AST_METHOD_REFERENCE' => 541, + 'ZEND_AST_NAMESPACE' => 542, + 'ZEND_AST_USE_ELEM' => 543, + 'ZEND_AST_TRAIT_ALIAS' => 544, + 'ZEND_AST_GROUP_USE' => 545, + 'ZEND_AST_ATTRIBUTE' => 546, + 'ZEND_AST_MATCH' => 547, + 'ZEND_AST_MATCH_ARM' => 548, + 'ZEND_AST_NAMED_ARG' => 549, + 'ZEND_AST_PARENT_PROPERTY_HOOK_CALL' => 550, + 'ZEND_AST_METHOD_CALL' => 768, + 'ZEND_AST_NULLSAFE_METHOD_CALL' => 769, + 'ZEND_AST_STATIC_CALL' => 770, + 'ZEND_AST_CONDITIONAL' => 771, + 'ZEND_AST_TRY' => 772, + 'ZEND_AST_CATCH' => 773, + 'ZEND_AST_PROP_GROUP' => 774, + 'ZEND_AST_CONST_ELEM' => 775, + 'ZEND_AST_CLASS_CONST_GROUP' => 776, + 'ZEND_AST_CONST_ENUM_INIT' => 777, + 'ZEND_AST_FOR' => 1024, + 'ZEND_AST_FOREACH' => 1025, + 'ZEND_AST_ENUM_CASE' => 1026, + 'ZEND_AST_PROP_ELEM' => 1027, + 'ZEND_AST_PARAM' => 1536, + 'ZEND_PROPERTY_HOOK_GET' => 0, + 'ZEND_PROPERTY_HOOK_SET' => 1, + 'ZEND_NOP' => 0, + 'ZEND_ADD' => 1, + 'ZEND_SUB' => 2, + 'ZEND_MUL' => 3, + 'ZEND_DIV' => 4, + 'ZEND_MOD' => 5, + 'ZEND_SL' => 6, + 'ZEND_SR' => 7, + 'ZEND_CONCAT' => 8, + 'ZEND_BW_OR' => 9, + 'ZEND_BW_AND' => 10, + 'ZEND_BW_XOR' => 11, + 'ZEND_POW' => 12, + 'ZEND_BW_NOT' => 13, + 'ZEND_BOOL_NOT' => 14, + 'ZEND_BOOL_XOR' => 15, + 'ZEND_IS_IDENTICAL' => 16, + 'ZEND_IS_NOT_IDENTICAL' => 17, + 'ZEND_IS_EQUAL' => 18, + 'ZEND_IS_NOT_EQUAL' => 19, + 'ZEND_IS_SMALLER' => 20, + 'ZEND_IS_SMALLER_OR_EQUAL' => 21, + 'ZEND_ASSIGN' => 22, + 'ZEND_ASSIGN_DIM' => 23, + 'ZEND_ASSIGN_OBJ' => 24, + 'ZEND_ASSIGN_STATIC_PROP' => 25, + 'ZEND_ASSIGN_OP' => 26, + 'ZEND_ASSIGN_DIM_OP' => 27, + 'ZEND_ASSIGN_OBJ_OP' => 28, + 'ZEND_ASSIGN_STATIC_PROP_OP' => 29, + 'ZEND_ASSIGN_REF' => 30, + 'ZEND_QM_ASSIGN' => 31, + 'ZEND_ASSIGN_OBJ_REF' => 32, + 'ZEND_ASSIGN_STATIC_PROP_REF' => 33, + 'ZEND_PRE_INC' => 34, + 'ZEND_PRE_DEC' => 35, + 'ZEND_POST_INC' => 36, + 'ZEND_POST_DEC' => 37, + 'ZEND_PRE_INC_STATIC_PROP' => 38, + 'ZEND_PRE_DEC_STATIC_PROP' => 39, + 'ZEND_POST_INC_STATIC_PROP' => 40, + 'ZEND_POST_DEC_STATIC_PROP' => 41, + 'ZEND_JMP' => 42, + 'ZEND_JMPZ' => 43, + 'ZEND_JMPNZ' => 44, + 'ZEND_JMPZ_EX' => 46, + 'ZEND_JMPNZ_EX' => 47, + 'ZEND_CASE' => 48, + 'ZEND_CHECK_VAR' => 49, + 'ZEND_SEND_VAR_NO_REF_EX' => 50, + 'ZEND_CAST' => 51, + 'ZEND_BOOL' => 52, + 'ZEND_FAST_CONCAT' => 53, + 'ZEND_ROPE_INIT' => 54, + 'ZEND_ROPE_ADD' => 55, + 'ZEND_ROPE_END' => 56, + 'ZEND_BEGIN_SILENCE' => 57, + 'ZEND_END_SILENCE' => 58, + 'ZEND_INIT_FCALL_BY_NAME' => 59, + 'ZEND_DO_FCALL' => 60, + 'ZEND_INIT_FCALL' => 61, + 'ZEND_RETURN' => 62, + 'ZEND_RECV' => 63, + 'ZEND_RECV_INIT' => 64, + 'ZEND_SEND_VAL' => 65, + 'ZEND_SEND_VAR_EX' => 66, + 'ZEND_SEND_REF' => 67, + 'ZEND_NEW' => 68, + 'ZEND_INIT_NS_FCALL_BY_NAME' => 69, + 'ZEND_FREE' => 70, + 'ZEND_INIT_ARRAY' => 71, + 'ZEND_ADD_ARRAY_ELEMENT' => 72, + 'ZEND_INCLUDE_OR_EVAL' => 73, + 'ZEND_UNSET_VAR' => 74, + 'ZEND_UNSET_DIM' => 75, + 'ZEND_UNSET_OBJ' => 76, + 'ZEND_FE_RESET_R' => 77, + 'ZEND_FE_FETCH_R' => 78, + 'ZEND_FETCH_R' => 80, + 'ZEND_FETCH_DIM_R' => 81, + 'ZEND_FETCH_OBJ_R' => 82, + 'ZEND_FETCH_W' => 83, + 'ZEND_FETCH_DIM_W' => 84, + 'ZEND_FETCH_OBJ_W' => 85, + 'ZEND_FETCH_RW' => 86, + 'ZEND_FETCH_DIM_RW' => 87, + 'ZEND_FETCH_OBJ_RW' => 88, + 'ZEND_FETCH_IS' => 89, + 'ZEND_FETCH_DIM_IS' => 90, + 'ZEND_FETCH_OBJ_IS' => 91, + 'ZEND_FETCH_FUNC_ARG' => 92, + 'ZEND_FETCH_DIM_FUNC_ARG' => 93, + 'ZEND_FETCH_OBJ_FUNC_ARG' => 94, + 'ZEND_FETCH_UNSET' => 95, + 'ZEND_FETCH_DIM_UNSET' => 96, + 'ZEND_FETCH_OBJ_UNSET' => 97, + 'ZEND_FETCH_LIST_R' => 98, + 'ZEND_FETCH_CONSTANT' => 99, + 'ZEND_CHECK_FUNC_ARG' => 100, + 'ZEND_EXT_STMT' => 101, + 'ZEND_EXT_FCALL_BEGIN' => 102, + 'ZEND_EXT_FCALL_END' => 103, + 'ZEND_EXT_NOP' => 104, + 'ZEND_TICKS' => 105, + 'ZEND_SEND_VAR_NO_REF' => 106, + 'ZEND_CATCH' => 107, + 'ZEND_THROW' => 108, + 'ZEND_FETCH_CLASS' => 109, + 'ZEND_CLONE' => 110, + 'ZEND_RETURN_BY_REF' => 111, + 'ZEND_INIT_METHOD_CALL' => 112, + 'ZEND_INIT_STATIC_METHOD_CALL' => 113, + 'ZEND_ISSET_ISEMPTY_VAR' => 114, + 'ZEND_ISSET_ISEMPTY_DIM_OBJ' => 115, + 'ZEND_SEND_VAL_EX' => 116, + 'ZEND_SEND_VAR' => 117, + 'ZEND_INIT_USER_CALL' => 118, + 'ZEND_SEND_ARRAY' => 119, + 'ZEND_SEND_USER' => 120, + 'ZEND_STRLEN' => 121, + 'ZEND_DEFINED' => 122, + 'ZEND_TYPE_CHECK' => 123, + 'ZEND_VERIFY_RETURN_TYPE' => 124, + 'ZEND_FE_RESET_RW' => 125, + 'ZEND_FE_FETCH_RW' => 126, + 'ZEND_FE_FREE' => 127, + 'ZEND_INIT_DYNAMIC_CALL' => 128, + 'ZEND_DO_ICALL' => 129, + 'ZEND_DO_UCALL' => 130, + 'ZEND_DO_FCALL_BY_NAME' => 131, + 'ZEND_PRE_INC_OBJ' => 132, + 'ZEND_PRE_DEC_OBJ' => 133, + 'ZEND_POST_INC_OBJ' => 134, + 'ZEND_POST_DEC_OBJ' => 135, + 'ZEND_ECHO' => 136, + 'ZEND_OP_DATA' => 137, + 'ZEND_INSTANCEOF' => 138, + 'ZEND_GENERATOR_CREATE' => 139, + 'ZEND_MAKE_REF' => 140, + 'ZEND_DECLARE_FUNCTION' => 141, + 'ZEND_DECLARE_LAMBDA_FUNCTION' => 142, + 'ZEND_DECLARE_CONST' => 143, + 'ZEND_DECLARE_CLASS' => 144, + 'ZEND_DECLARE_CLASS_DELAYED' => 145, + 'ZEND_DECLARE_ANON_CLASS' => 146, + 'ZEND_ADD_ARRAY_UNPACK' => 147, + 'ZEND_ISSET_ISEMPTY_PROP_OBJ' => 148, + 'ZEND_HANDLE_EXCEPTION' => 149, + 'ZEND_USER_OPCODE' => 150, + 'ZEND_ASSERT_CHECK' => 151, + 'ZEND_JMP_SET' => 152, + 'ZEND_UNSET_CV' => 153, + 'ZEND_ISSET_ISEMPTY_CV' => 154, + 'ZEND_FETCH_LIST_W' => 155, + 'ZEND_SEPARATE' => 156, + 'ZEND_FETCH_CLASS_NAME' => 157, + 'ZEND_CALL_TRAMPOLINE' => 158, + 'ZEND_DISCARD_EXCEPTION' => 159, + 'ZEND_YIELD' => 160, + 'ZEND_GENERATOR_RETURN' => 161, + 'ZEND_FAST_CALL' => 162, + 'ZEND_FAST_RET' => 163, + 'ZEND_RECV_VARIADIC' => 164, + 'ZEND_SEND_UNPACK' => 165, + 'ZEND_YIELD_FROM' => 166, + 'ZEND_COPY_TMP' => 167, + 'ZEND_BIND_GLOBAL' => 168, + 'ZEND_COALESCE' => 169, + 'ZEND_SPACESHIP' => 170, + 'ZEND_FUNC_NUM_ARGS' => 171, + 'ZEND_FUNC_GET_ARGS' => 172, + 'ZEND_FETCH_STATIC_PROP_R' => 173, + 'ZEND_FETCH_STATIC_PROP_W' => 174, + 'ZEND_FETCH_STATIC_PROP_RW' => 175, + 'ZEND_FETCH_STATIC_PROP_IS' => 176, + 'ZEND_FETCH_STATIC_PROP_FUNC_ARG' => 177, + 'ZEND_FETCH_STATIC_PROP_UNSET' => 178, + 'ZEND_UNSET_STATIC_PROP' => 179, + 'ZEND_ISSET_ISEMPTY_STATIC_PROP' => 180, + 'ZEND_FETCH_CLASS_CONSTANT' => 181, + 'ZEND_BIND_LEXICAL' => 182, + 'ZEND_BIND_STATIC' => 183, + 'ZEND_FETCH_THIS' => 184, + 'ZEND_SEND_FUNC_ARG' => 185, + 'ZEND_ISSET_ISEMPTY_THIS' => 186, + 'ZEND_SWITCH_LONG' => 187, + 'ZEND_SWITCH_STRING' => 188, + 'ZEND_IN_ARRAY' => 189, + 'ZEND_COUNT' => 190, + 'ZEND_GET_CLASS' => 191, + 'ZEND_GET_CALLED_CLASS' => 192, + 'ZEND_GET_TYPE' => 193, + 'ZEND_ARRAY_KEY_EXISTS' => 194, + 'ZEND_MATCH' => 195, + 'ZEND_CASE_STRICT' => 196, + 'ZEND_MATCH_ERROR' => 197, + 'ZEND_JMP_NULL' => 198, + 'ZEND_CHECK_UNDEF_ARGS' => 199, + 'ZEND_FETCH_GLOBALS' => 200, + 'ZEND_VERIFY_NEVER_TYPE' => 201, + 'ZEND_CALLABLE_CONVERT' => 202, + 'ZEND_BIND_INIT_STATIC_OR_JMP' => 203, + 'ZEND_FRAMELESS_ICALL_0' => 204, + 'ZEND_FRAMELESS_ICALL_1' => 205, + 'ZEND_FRAMELESS_ICALL_2' => 206, + 'ZEND_FRAMELESS_ICALL_3' => 207, + 'ZEND_JMP_FRAMELESS' => 208, + 'ZEND_INIT_PARENT_PROPERTY_HOOK_CALL' => 209, + 'ZEND_VM_LAST_OPCODE' => 209, +]; diff --git a/include/8.4/linux-x64-zts/engine.h b/include/8.4/linux-x64-zts/engine.h new file mode 100644 index 0000000..aa2e559 --- /dev/null +++ b/include/8.4/linux-x64-zts/engine.h @@ -0,0 +1,1155 @@ +#define FFI_SCOPE "ZEngine" +/* + * Generated by tools/generator for PHP 8.4 (linux-x64-zts, release) - DO NOT EDIT. + * Regenerate with `composer gen-headers`. + */ +typedef unsigned int __uint32_t; +typedef unsigned int __uid_t; +typedef int __pid_t; +typedef long int __clock_t; +typedef long int __time_t; +typedef void * __timer_t; +typedef __pid_t pid_t; +typedef __time_t time_t; +typedef __timer_t timer_t; +typedef struct +{ + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; +} __sigset_t; +typedef long int __jmp_buf[8]; +struct __jmp_buf_tag + { + __jmp_buf __jmpbuf; + int __mask_was_saved; + __sigset_t __saved_mask; + }; +typedef int ts_rsrc_id; +union sigval +{ + int sival_int; + void *sival_ptr; +}; +typedef union sigval __sigval_t; +typedef struct + { + int si_signo; + int si_errno; + int si_code; + int __pad0; + union + { + int _pad[((128 / sizeof (int)) - 4)]; + struct + { + __pid_t si_pid; + __uid_t si_uid; + } _kill; + struct + { + int si_tid; + int si_overrun; + __sigval_t si_sigval; + } _timer; + struct + { + __pid_t si_pid; + __uid_t si_uid; + __sigval_t si_sigval; + } _rt; + struct + { + __pid_t si_pid; + __uid_t si_uid; + int si_status; + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + struct + { + void *si_addr; + short int si_addr_lsb; + union + { + struct + { + void *_lower; + void *_upper; + } _addr_bnd; + __uint32_t _pkey; + } _bounds; + } _sigfault; + struct + { + long int si_band; + int si_fd; + } _sigpoll; + struct + { + void *_call_addr; + int _syscall; + unsigned int _arch; + } _sigsys; + } _sifields; + } siginfo_t; +typedef void (*__sighandler_t) (int); +struct sigaction + { + union + { + __sighandler_t sa_handler; + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; + __sigset_t sa_mask; + int sa_flags; + void (*sa_restorer) (void); + }; +struct _IO_FILE; +typedef struct _IO_FILE FILE; +typedef int64_t zend_long; +typedef uint64_t zend_ulong; +typedef enum { + SUCCESS = 0, + FAILURE = -1, +} ZEND_RESULT_CODE; +typedef ZEND_RESULT_CODE zend_result; +typedef struct _zend_object_handlers zend_object_handlers; +typedef struct _zend_class_entry zend_class_entry; +typedef union _zend_function zend_function; +typedef struct _zend_execute_data zend_execute_data; +typedef struct _zval_struct zval; +typedef struct _zend_refcounted zend_refcounted; +typedef struct _zend_string zend_string; +typedef struct _zend_array zend_array; +typedef struct _zend_object zend_object; +typedef struct _zend_resource zend_resource; +typedef struct _zend_reference zend_reference; +typedef struct _zend_ast_ref zend_ast_ref; +typedef struct _zend_ast zend_ast; +typedef void (*dtor_func_t)(zval *pDest); +typedef struct { + void *ptr; + uint32_t type_mask; +} zend_type; +typedef struct { + uint32_t num_types; + zend_type types[1]; +} zend_type_list; +typedef union _zend_value { + zend_long lval; + double dval; + zend_refcounted *counted; + zend_string *str; + zend_array *arr; + zend_object *obj; + zend_resource *res; + zend_reference *ref; + zend_ast_ref *ast; + zval *zv; + void *ptr; + zend_class_entry *ce; + zend_function *func; + struct { + uint32_t w1; + uint32_t w2; + } ww; +} zend_value; +struct _zval_struct { + zend_value value; + union { + uint32_t type_info; + struct { + uint8_t type; uint8_t type_flags; union { uint16_t extra; } u; + } v; + } u1; + union { + uint32_t next; + uint32_t cache_slot; + uint32_t opline_num; + uint32_t lineno; + uint32_t num_args; + uint32_t fe_pos; + uint32_t fe_iter_idx; + uint32_t guard; + uint32_t constant_flags; + uint32_t extra; + } u2; +}; +typedef struct _zend_refcounted_h { + uint32_t refcount; + union { + uint32_t type_info; + } u; +} zend_refcounted_h; +struct _zend_refcounted { + zend_refcounted_h gc; +}; +struct _zend_string { + zend_refcounted_h gc; + zend_ulong h; + size_t len; + char val[1]; +}; +typedef struct _Bucket { + zval val; + zend_ulong h; + zend_string *key; +} Bucket; +typedef struct _zend_array HashTable; +struct _zend_array { + zend_refcounted_h gc; + union { + struct { + uint8_t flags; uint8_t _unused; uint8_t nIteratorsCount; uint8_t _unused2; + } v; + uint32_t flags; + } u; + uint32_t nTableMask; + union { + uint32_t *arHash; + Bucket *arData; + zval *arPacked; + }; + uint32_t nNumUsed; + uint32_t nNumOfElements; + uint32_t nTableSize; + uint32_t nInternalPointer; + zend_long nNextFreeElement; + dtor_func_t pDestructor; +}; +typedef uint32_t HashPosition; +typedef struct _HashTableIterator { + HashTable *ht; + HashPosition pos; + uint32_t next_copy; +} HashTableIterator; +struct _zend_object { + zend_refcounted_h gc; + uint32_t handle; + uint32_t extra_flags; + zend_class_entry *ce; + const zend_object_handlers *handlers; + HashTable *properties; + zval properties_table[1]; +}; +struct _zend_resource { + zend_refcounted_h gc; + zend_long handle; + int type; + void *ptr; +}; +typedef union { + struct _zend_property_info *ptr; + uintptr_t list; +} zend_property_info_source_list; +struct _zend_reference { + zend_refcounted_h gc; + zval val; + zend_property_info_source_list sources; +}; +struct _zend_ast_ref { + zend_refcounted_h gc; +}; +typedef struct _zend_llist_element { + struct _zend_llist_element *next; + struct _zend_llist_element *prev; + char data[1]; +} zend_llist_element; +typedef void (*llist_dtor_func_t)(void *); +typedef struct _zend_llist { + zend_llist_element *head; + zend_llist_element *tail; + size_t count; + size_t size; + llist_dtor_func_t dtor; + unsigned char persistent; + zend_llist_element *traverse_ptr; +} zend_llist; +typedef struct { + zval *cur; + zval *end; + zval *start; +} zend_get_gc_buffer; +typedef uint16_t zend_ast_kind; +typedef uint16_t zend_ast_attr; +struct _zend_ast { + zend_ast_kind kind; + zend_ast_attr attr; + uint32_t lineno; + zend_ast *child[1]; +}; +typedef struct _zend_ast_list { + zend_ast_kind kind; + zend_ast_attr attr; + uint32_t lineno; + uint32_t children; + zend_ast *child[1]; +} zend_ast_list; +typedef struct _zend_ast_zval { + zend_ast_kind kind; + zend_ast_attr attr; + zval val; +} zend_ast_zval; +typedef struct _zend_ast_decl { + zend_ast_kind kind; + zend_ast_attr attr; + uint32_t start_lineno; + uint32_t end_lineno; + uint32_t flags; + zend_string *doc_comment; + zend_string *name; + zend_ast *child[5]; +} zend_ast_decl; +typedef void (*zend_ast_process_t)(zend_ast *ast); +typedef struct _zend_object_iterator zend_object_iterator; +typedef struct _zend_object_iterator_funcs { + void (*dtor)(zend_object_iterator *iter); + zend_result (*valid)(zend_object_iterator *iter); + zval *(*get_current_data)(zend_object_iterator *iter); + void (*get_current_key)(zend_object_iterator *iter, zval *key); + void (*move_forward)(zend_object_iterator *iter); + void (*rewind)(zend_object_iterator *iter); + void (*invalidate_current)(zend_object_iterator *iter); + HashTable *(*get_gc)(zend_object_iterator *iter, zval **table, int *n); +} zend_object_iterator_funcs; +struct _zend_object_iterator { + zend_object std; + zval data; + const zend_object_iterator_funcs *funcs; + zend_ulong index; +}; +typedef struct _zend_class_iterator_funcs { + zend_function *zf_new_iterator; + zend_function *zf_valid; + zend_function *zf_current; + zend_function *zf_key; + zend_function *zf_next; + zend_function *zf_rewind; +} zend_class_iterator_funcs; +typedef struct _zend_class_arrayaccess_funcs { + zend_function *zf_offsetget; + zend_function *zf_offsetexists; + zend_function *zf_offsetset; + zend_function *zf_offsetunset; +} zend_class_arrayaccess_funcs; +typedef size_t (*zend_stream_fsizer_t)(void* handle); +typedef ssize_t (*zend_stream_reader_t)(void* handle, char *buf, size_t len); +typedef void (*zend_stream_closer_t)(void* handle); +typedef struct _zend_stream { + void *handle; + int isatty; + zend_stream_reader_t reader; + zend_stream_fsizer_t fsizer; + zend_stream_closer_t closer; +} zend_stream; +typedef struct _zend_file_handle { + union { + FILE *fp; + zend_stream stream; + } handle; + zend_string *filename; + zend_string *opened_path; + uint8_t type; + _Bool primary_script; + _Bool in_list; + char *buf; + size_t len; +} zend_file_handle; +struct _zend_serialize_data; +struct _zend_unserialize_data; +typedef struct _zend_serialize_data zend_serialize_data; +typedef struct _zend_unserialize_data zend_unserialize_data; +typedef struct _zend_class_name { + zend_string *name; + zend_string *lc_name; +} zend_class_name; +typedef struct _zend_trait_method_reference { + zend_string *method_name; + zend_string *class_name; +} zend_trait_method_reference; +typedef struct _zend_trait_precedence { + zend_trait_method_reference trait_method; + uint32_t num_excludes; + zend_string *exclude_class_names[1]; +} zend_trait_precedence; +typedef struct _zend_trait_alias { + zend_trait_method_reference trait_method; + zend_string *alias; + uint32_t modifiers; +} zend_trait_alias; +typedef struct _zend_class_mutable_data { + zval *default_properties_table; + HashTable *constants_table; + uint32_t ce_flags; + HashTable *backed_enum_table; +} zend_class_mutable_data; +typedef struct _zend_class_dependency { + zend_string *name; + zend_class_entry *ce; +} zend_class_dependency; +typedef struct _zend_inheritance_cache_entry zend_inheritance_cache_entry; +typedef struct _zend_error_info { + int type; + uint32_t lineno; + zend_string *filename; + zend_string *message; +} zend_error_info; +struct _zend_inheritance_cache_entry { + zend_inheritance_cache_entry *next; + zend_class_entry *ce; + zend_class_entry *parent; + zend_class_dependency *dependencies; + uint32_t dependencies_count; + uint32_t num_warnings; + zend_error_info **warnings; + zend_class_entry *traits_and_interfaces[1]; +}; +struct _zend_class_entry { + char type; + zend_string *name; + union { + zend_class_entry *parent; + zend_string *parent_name; + }; + int refcount; + uint32_t ce_flags; + int default_properties_count; + int default_static_members_count; + zval *default_properties_table; + zval *default_static_members_table; + zval * static_members_table__ptr; + HashTable function_table; + HashTable properties_info; + HashTable constants_table; + zend_class_mutable_data* mutable_data__ptr; + zend_inheritance_cache_entry *inheritance_cache; + struct _zend_property_info **properties_info_table; + zend_function *constructor; + zend_function *destructor; + zend_function *clone; + zend_function *__get; + zend_function *__set; + zend_function *__unset; + zend_function *__isset; + zend_function *__call; + zend_function *__callstatic; + zend_function *__tostring; + zend_function *__debugInfo; + zend_function *__serialize; + zend_function *__unserialize; + const zend_object_handlers *default_object_handlers; + zend_class_iterator_funcs *iterator_funcs_ptr; + zend_class_arrayaccess_funcs *arrayaccess_funcs_ptr; + union { + zend_object* (*create_object)(zend_class_entry *class_type); + int (*interface_gets_implemented)(zend_class_entry *iface, zend_class_entry *class_type); + }; + zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref); + zend_function *(*get_static_method)(zend_class_entry *ce, zend_string* method); + int (*serialize)(zval *object, unsigned char **buffer, size_t *buf_len, zend_serialize_data *data); + int (*unserialize)(zval *object, zend_class_entry *ce, const unsigned char *buf, size_t buf_len, zend_unserialize_data *data); + uint32_t num_interfaces; + uint32_t num_traits; + uint32_t num_hooked_props; + uint32_t num_hooked_prop_variance_checks; + union { + zend_class_entry **interfaces; + zend_class_name *interface_names; + }; + zend_class_name *trait_names; + zend_trait_alias **trait_aliases; + zend_trait_precedence **trait_precedences; + HashTable *attributes; + uint32_t enum_backing_type; + HashTable *backed_enum_table; + zend_string *doc_comment; + union { + struct { + zend_string *filename; + uint32_t line_start; + uint32_t line_end; + } user; + struct { + const struct _zend_function_entry *builtin_functions; + struct _zend_module_entry *module; + } internal; + } info; +}; +typedef enum { + EH_NORMAL = 0, + EH_THROW +} zend_error_handling_t; +typedef enum { + ZEND_PROPERTY_HOOK_GET = 0, + ZEND_PROPERTY_HOOK_SET = 1, +} zend_property_hook_kind; +typedef struct _zend_lazy_objects_store { + HashTable infos; +} zend_lazy_objects_store; +typedef struct _zend_property_info zend_property_info; +struct _zend_property_info; +typedef zval *(*zend_object_read_property_t)(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv); +typedef zval *(*zend_object_read_dimension_t)(zend_object *object, zval *offset, int type, zval *rv); +typedef zval *(*zend_object_write_property_t)(zend_object *object, zend_string *member, zval *value, void **cache_slot); +typedef void (*zend_object_write_dimension_t)(zend_object *object, zval *offset, zval *value); +typedef zval *(*zend_object_get_property_ptr_ptr_t)(zend_object *object, zend_string *member, int type, void **cache_slot); +typedef int (*zend_object_has_property_t)(zend_object *object, zend_string *member, int has_set_exists, void **cache_slot); +typedef int (*zend_object_has_dimension_t)(zend_object *object, zval *member, int check_empty); +typedef void (*zend_object_unset_property_t)(zend_object *object, zend_string *member, void **cache_slot); +typedef void (*zend_object_unset_dimension_t)(zend_object *object, zval *offset); +typedef HashTable *(*zend_object_get_properties_t)(zend_object *object); +typedef HashTable *(*zend_object_get_debug_info_t)(zend_object *object, int *is_temp); +typedef enum _zend_prop_purpose { + ZEND_PROP_PURPOSE_DEBUG, + ZEND_PROP_PURPOSE_ARRAY_CAST, + ZEND_PROP_PURPOSE_SERIALIZE, + ZEND_PROP_PURPOSE_VAR_EXPORT, + ZEND_PROP_PURPOSE_JSON, + ZEND_PROP_PURPOSE_GET_OBJECT_VARS, + _ZEND_PROP_PURPOSE_NON_EXHAUSTIVE_ENUM +} zend_prop_purpose; +typedef zend_array *(*zend_object_get_properties_for_t)(zend_object *object, zend_prop_purpose purpose); +typedef zend_function *(*zend_object_get_method_t)(zend_object **object, zend_string *method, const zval *key); +typedef zend_function *(*zend_object_get_constructor_t)(zend_object *object); +typedef void (*zend_object_free_obj_t)(zend_object *object); +typedef void (*zend_object_dtor_obj_t)(zend_object *object); +typedef zend_object* (*zend_object_clone_obj_t)(zend_object *object); +typedef zend_string *(*zend_object_get_class_name_t)(const zend_object *object); +typedef int (*zend_object_compare_t)(zval *object1, zval *object2); +typedef zend_result (*zend_object_cast_t)(zend_object *readobj, zval *retval, int type); +typedef zend_result (*zend_object_count_elements_t)(zend_object *object, zend_long *count); +typedef zend_result (*zend_object_get_closure_t)(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, _Bool check_only); +typedef HashTable *(*zend_object_get_gc_t)(zend_object *object, zval **table, int *n); +typedef zend_result (*zend_object_do_operation_t)(uint8_t opcode, zval *result, zval *op1, zval *op2); +struct _zend_object_handlers { + int offset; + zend_object_free_obj_t free_obj; + zend_object_dtor_obj_t dtor_obj; + zend_object_clone_obj_t clone_obj; + zend_object_read_property_t read_property; + zend_object_write_property_t write_property; + zend_object_read_dimension_t read_dimension; + zend_object_write_dimension_t write_dimension; + zend_object_get_property_ptr_ptr_t get_property_ptr_ptr; + zend_object_has_property_t has_property; + zend_object_unset_property_t unset_property; + zend_object_has_dimension_t has_dimension; + zend_object_unset_dimension_t unset_dimension; + zend_object_get_properties_t get_properties; + zend_object_get_method_t get_method; + zend_object_get_constructor_t get_constructor; + zend_object_get_class_name_t get_class_name; + zend_object_cast_t cast_object; + zend_object_count_elements_t count_elements; + zend_object_get_debug_info_t get_debug_info; + zend_object_get_closure_t get_closure; + zend_object_get_gc_t get_gc; + zend_object_do_operation_t do_operation; + zend_object_compare_t compare; + zend_object_get_properties_for_t get_properties_for; +}; +typedef struct _zend_strtod_bigint zend_strtod_bigint; +typedef struct _zend_strtod_state { + zend_strtod_bigint *freelist[7 +1]; + zend_strtod_bigint *p5s; + char *result; +} zend_strtod_state; +typedef struct _zend_op zend_op; +typedef struct { + void *handler; + uint32_t num_args; +} zend_frameless_function_info; +typedef struct _zend_op_array zend_op_array; +typedef union _znode_op { + uint32_t constant; + uint32_t var; + uint32_t num; + uint32_t opline_num; + uint32_t jmp_offset; +} znode_op; +typedef struct _zend_declarables { + zend_long ticks; +} zend_declarables; +typedef struct _zend_file_context { + zend_declarables declarables; + zend_string *current_namespace; + _Bool in_namespace; + _Bool has_bracketed_namespaces; + HashTable *imports; + HashTable *imports_function; + HashTable *imports_const; + HashTable seen_symbols; +} zend_file_context; +typedef int (*user_opcode_handler_t) (zend_execute_data *execute_data); +struct _zend_op { + const void *handler; + znode_op op1; + znode_op op2; + znode_op result; + uint32_t extended_value; + uint32_t lineno; + uint8_t opcode; + uint8_t op1_type; + uint8_t op2_type; + uint8_t result_type; +}; +typedef struct _zend_brk_cont_element { + int start; + int cont; + int brk; + int parent; + _Bool is_switch; +} zend_brk_cont_element; +typedef struct _zend_try_catch_element { + uint32_t try_op; + uint32_t catch_op; + uint32_t finally_op; + uint32_t finally_end; +} zend_try_catch_element; +typedef struct _zend_live_range { + uint32_t var; + uint32_t start; + uint32_t end; +} zend_live_range; +typedef struct _zend_oparray_context { + struct _zend_oparray_context *prev; + zend_op_array *op_array; + uint32_t opcodes_size; + int vars_size; + int literals_size; + uint32_t fast_call_var; + uint32_t try_catch_offset; + int current_brk_cont; + int last_brk_cont; + zend_brk_cont_element *brk_cont_array; + HashTable *labels; + const zend_property_info *active_property_info; + zend_property_hook_kind active_property_hook_kind; + _Bool in_jmp_frameless_branch; +} zend_oparray_context; +struct _zend_property_info { + uint32_t offset; + uint32_t flags; + zend_string *name; + zend_string *doc_comment; + HashTable *attributes; + zend_class_entry *ce; + zend_type type; + const zend_property_info *prototype; + zend_function **hooks; +}; +typedef struct _zend_class_constant { + zval value; + zend_string *doc_comment; + HashTable *attributes; + zend_class_entry *ce; + zend_type type; +} zend_class_constant; +typedef struct _zend_internal_arg_info { + const char *name; + zend_type type; + const char *default_value; +} zend_internal_arg_info; +typedef struct _zend_arg_info { + zend_string *name; + zend_type type; + zend_string *default_value; +} zend_arg_info; +struct _zend_op_array { + uint8_t type; + uint8_t arg_flags[3]; + uint32_t fn_flags; + zend_string *function_name; + zend_class_entry *scope; + zend_function *prototype; + uint32_t num_args; + uint32_t required_num_args; + zend_arg_info *arg_info; + HashTable *attributes; + void ** run_time_cache__ptr; + zend_string *doc_comment; + uint32_t T; + const zend_property_info *prop_info; + int cache_size; + int last_var; + uint32_t last; + zend_op *opcodes; + HashTable * static_variables_ptr__ptr; + HashTable *static_variables; + zend_string **vars; + uint32_t *refcount; + int last_live_range; + int last_try_catch; + zend_live_range *live_range; + zend_try_catch_element *try_catch_array; + zend_string *filename; + uint32_t line_start; + uint32_t line_end; + int last_literal; + uint32_t num_dynamic_func_defs; + zval *literals; + zend_op_array **dynamic_func_defs; + void *reserved[6]; +}; +typedef void ( *zif_handler)(zend_execute_data *execute_data, zval *return_value); +typedef struct _zend_internal_function { + uint8_t type; + uint8_t arg_flags[3]; + uint32_t fn_flags; + zend_string* function_name; + zend_class_entry *scope; + zend_function *prototype; + uint32_t num_args; + uint32_t required_num_args; + zend_internal_arg_info *arg_info; + HashTable *attributes; + void ** run_time_cache__ptr; + zend_string *doc_comment; + uint32_t T; + const zend_property_info *prop_info; + zif_handler handler; + struct _zend_module_entry *module; + const zend_frameless_function_info *frameless_function_infos; + void *reserved[6]; +} zend_internal_function; +union _zend_function { + uint8_t type; + uint32_t quick_arg_flags; + struct { + uint8_t type; + uint8_t arg_flags[3]; + uint32_t fn_flags; + zend_string *function_name; + zend_class_entry *scope; + zend_function *prototype; + uint32_t num_args; + uint32_t required_num_args; + zend_arg_info *arg_info; + HashTable *attributes; + void ** run_time_cache__ptr; + zend_string *doc_comment; + uint32_t T; + const zend_property_info *prop_info; + } common; + zend_op_array op_array; + zend_internal_function internal_function; +}; +struct _zend_execute_data { + const zend_op *opline; + zend_execute_data *call; + zval *return_value; + zend_function *func; + zval This; + zend_execute_data *prev_execute_data; + zend_array *symbol_table; + void **run_time_cache; + zend_array *extra_named_params; +}; +typedef struct __jmp_buf_tag sigjmp_buf[1]; +typedef struct _zend_compiler_globals zend_compiler_globals; +typedef struct _zend_executor_globals zend_executor_globals; +typedef struct zend_atomic_bool_s { + _Bool value; +} zend_atomic_bool; +typedef struct _zend_stack { + int size, top, max; + void *elements; +} zend_stack; +typedef struct _zend_ptr_stack { + int top, max; + void **elements; + void **top_element; + _Bool persistent; +} zend_ptr_stack; +typedef struct _zend_objects_store { + zend_object **object_buckets; + uint32_t top; + uint32_t size; + int free_list_head; +} zend_objects_store; +typedef struct _zend_encoding zend_encoding; +typedef size_t (*zend_encoding_filter)(unsigned char **str, size_t *str_length, const unsigned char *buf, size_t length); +typedef struct _zend_arena zend_arena; +struct _zend_arena { + char *ptr; + char *end; + zend_arena *prev; +}; +typedef struct _zend_call_stack { + void *base; + size_t max_size; +} zend_call_stack; +typedef struct _zend_vm_stack *zend_vm_stack; +typedef struct _zend_ini_entry zend_ini_entry; +typedef struct _zend_fiber_context zend_fiber_context; +typedef struct _zend_fiber zend_fiber; +typedef enum { + ZEND_MEMOIZE_NONE, + ZEND_MEMOIZE_COMPILE, + ZEND_MEMOIZE_FETCH, +} zend_memoize_mode; +struct _zend_compiler_globals { + zend_stack loop_var_stack; + zend_class_entry *active_class_entry; + zend_string *compiled_filename; + int zend_lineno; + zend_op_array *active_op_array; + HashTable *function_table; + HashTable *class_table; + HashTable *auto_globals; + uint8_t parse_error; + _Bool in_compilation; + _Bool short_tags; + _Bool unclean_shutdown; + _Bool ini_parser_unbuffered_errors; + zend_llist open_files; + struct _zend_ini_parser_param *ini_parser_param; + _Bool skip_shebang; + _Bool increment_lineno; + _Bool variable_width_locale; + _Bool ascii_compatible_locale; + zend_string *doc_comment; + uint32_t extra_fn_flags; + uint32_t compiler_options; + zend_oparray_context context; + zend_file_context file_context; + zend_arena *arena; + HashTable interned_strings; + const zend_encoding **script_encoding_list; + size_t script_encoding_list_size; + _Bool multibyte; + _Bool detect_unicode; + _Bool encoding_declared; + zend_ast *ast; + zend_arena *ast_arena; + zend_stack delayed_oplines_stack; + HashTable *memoized_exprs; + zend_memoize_mode memoize_mode; + void *map_ptr_real_base; + void *map_ptr_base; + size_t map_ptr_size; + size_t map_ptr_last; + HashTable *delayed_variance_obligations; + HashTable *delayed_autoloads; + HashTable *unlinked_uses; + zend_class_entry *current_linking_class; + uint32_t rtd_key_counter; + void *internal_run_time_cache; + uint32_t internal_run_time_cache_size; + zend_stack short_circuiting_opnums; + uint32_t copied_functions_count; +}; +struct _zend_executor_globals { + zval uninitialized_zval; + zval error_zval; + zend_array *symtable_cache[32]; + zend_array **symtable_cache_limit; + zend_array **symtable_cache_ptr; + zend_array symbol_table; + HashTable included_files; + sigjmp_buf *bailout; + int error_reporting; + int exit_status; + HashTable *function_table; + HashTable *class_table; + HashTable *zend_constants; + zval *vm_stack_top; + zval *vm_stack_end; + zend_vm_stack vm_stack; + size_t vm_stack_page_size; + struct _zend_execute_data *current_execute_data; + zend_class_entry *fake_scope; + uint32_t jit_trace_num; + zend_execute_data *current_observed_frame; + int ticks_count; + zend_long precision; + uint32_t persistent_constants_count; + uint32_t persistent_functions_count; + uint32_t persistent_classes_count; + _Bool no_extensions; + _Bool full_tables_cleanup; + zend_atomic_bool vm_interrupt; + zend_atomic_bool timed_out; + HashTable *in_autoload; + zend_long hard_timeout; + void *stack_base; + void *stack_limit; + HashTable regular_list; + HashTable persistent_list; + int user_error_handler_error_reporting; + _Bool exception_ignore_args; + zval user_error_handler; + zval user_exception_handler; + zend_stack user_error_handlers_error_reporting; + zend_stack user_error_handlers; + zend_stack user_exception_handlers; + zend_class_entry *exception_class; + zend_error_handling_t error_handling; + int capture_warnings_during_sccp; + zend_long timeout_seconds; + HashTable *ini_directives; + HashTable *modified_ini_directives; + zend_ini_entry *error_reporting_ini_entry; + zend_objects_store objects_store; + zend_lazy_objects_store lazy_objects_store; + zend_object *exception, *prev_exception; + const zend_op *opline_before_exception; + zend_op exception_op[3]; + struct _zend_module_entry *current_module; + _Bool active; + uint8_t flags; + zend_long assertions; + uint32_t ht_iterators_count; + uint32_t ht_iterators_used; + HashTableIterator *ht_iterators; + HashTableIterator ht_iterators_slots[16]; + void *saved_fpu_cw_ptr; + zend_function trampoline; + zend_op call_trampoline_op; + HashTable weakrefs; + zend_long exception_string_param_max_len; + zend_get_gc_buffer get_gc_buffer; + zend_fiber_context *main_fiber_context; + zend_fiber_context *current_fiber_context; + zend_fiber *active_fiber; + size_t fiber_stack_size; + _Bool record_errors; + uint32_t num_errors; + zend_error_info **errors; + zend_string *filename_override; + zend_long lineno_override; + zend_call_stack call_stack; + zend_long max_allowed_stack_size; + zend_ulong reserved_stack_size; + timer_t max_execution_timer_timer; + pid_t pid; + struct sigaction oldact; + zend_strtod_state strtod_state; + void *reserved[6]; +}; +typedef enum { + ON_TOKEN, + ON_FEEDBACK, + ON_STOP +} zend_php_scanner_event; +typedef struct _zend_module_entry zend_module_entry; +typedef struct _zend_module_dep zend_module_dep; +struct _zend_module_entry { + unsigned short size; + unsigned int zend_api; + unsigned char zend_debug; + unsigned char zts; + const struct _zend_ini_entry *ini_entry; + const struct _zend_module_dep *deps; + const char *name; + const struct _zend_function_entry *functions; + zend_result (*module_startup_func)(int type, int module_number); + zend_result (*module_shutdown_func)(int type, int module_number); + zend_result (*request_startup_func)(int type, int module_number); + zend_result (*request_shutdown_func)(int type, int module_number); + void (*info_func)(zend_module_entry *zend_module); + const char *version; + size_t globals_size; + ts_rsrc_id* globals_id_ptr; + void (*globals_ctor)(void *global); + void (*globals_dtor)(void *global); + zend_result (*post_deactivate_func)(void); + int module_started; + unsigned char type; + void *handle; + int module_number; + const char *build_id; +}; +struct _zend_module_dep { + const char *name; + const char *rel; + const char *version; + unsigned char type; +}; +struct _zend_vm_stack { + zval *top; + zval *end; + zend_vm_stack prev; +}; +struct _zend_function_entry { + const char *fname; + zif_handler handler; + const struct _zend_internal_arg_info *arg_info; + uint32_t num_args; + uint32_t flags; + const zend_frameless_function_info *frameless_function_infos; + const char *doc_comment; +}; +struct _zend_ini_entry { + zend_string *name; + int (*on_modify)(zend_ini_entry *entry, zend_string *new_value, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage); + void *mh_arg1; + void *mh_arg2; + void *mh_arg3; + zend_string *value; + zend_string *orig_value; + void (*displayer)(zend_ini_entry *ini_entry, int type); + int module_number; + uint8_t modifiable; + uint8_t orig_modifiable; + uint8_t modified; +}; +typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg); +struct _zend_ini_parser_param { + zend_ini_parser_cb_t ini_parser_cb; + void *arg; +}; +typedef struct _zend_constant { + zval value; + zend_string *name; +} zend_constant; +typedef struct { + zend_string *name; + zval value; +} zend_attribute_arg; +typedef struct _zend_attribute { + zend_string *name; + zend_string *lcname; + uint32_t flags; + uint32_t lineno; + uint32_t offset; + uint32_t argc; + zend_attribute_arg args[1]; +} zend_attribute; +typedef struct _zend_lex_state { + unsigned int yy_leng; + unsigned char *yy_start; + unsigned char *yy_text; + unsigned char *yy_cursor; + unsigned char *yy_marker; + unsigned char *yy_limit; + int yy_state; + zend_stack state_stack; + zend_ptr_stack heredoc_label_stack; + zend_stack nest_location_stack; + zend_file_handle *in; + uint32_t lineno; + zend_string *filename; + unsigned char *script_org; + size_t script_org_size; + unsigned char *script_filtered; + size_t script_filtered_size; + zend_encoding_filter input_filter; + zend_encoding_filter output_filter; + const zend_encoding *script_encoding; + void (*on_event)( + zend_php_scanner_event event, int token, int line, + const char *text, size_t length, void *context); + void *on_event_context; + zend_ast *ast; + zend_arena *ast_arena; +} zend_lex_state; +typedef struct _zend_script { + zend_string *filename; + zend_op_array main_op_array; + HashTable function_table; + HashTable class_table; +} zend_script; +typedef struct _zend_closure { + zend_object std; + zend_function func; + zval this_ptr; + zend_class_entry *called_scope; + zif_handler orig_internal_handler; +} zend_closure; +typedef time_t accel_time_t; +typedef struct _zend_early_binding { + zend_string *lcname; + zend_string *rtd_key; + zend_string *lc_parent_name; + uint32_t cache_slot; +} zend_early_binding; +typedef struct _zend_persistent_script { + zend_script script; + zend_long compiler_halt_offset; + int ping_auto_globals_mask; + accel_time_t timestamp; + _Bool corrupted; + _Bool is_phar; + _Bool empty; + uint32_t num_warnings; + uint32_t num_early_bindings; + zend_error_info **warnings; + zend_early_binding *early_bindings; + void *mem; + size_t size; + struct zend_persistent_script_dynamic_members { + time_t last_used; + zend_ulong hits; + unsigned int memory_consumption; + time_t revalidate; + } dynamic_members; +} zend_persistent_script; +typedef struct _zend_file_cache_metainfo { + char magic[8]; + char system_id[32]; + size_t mem_size; + size_t str_size; + size_t script_offset; + accel_time_t timestamp; + uint32_t checksum; +} zend_file_cache_metainfo; + +/* Imported functions */ +extern zend_result zend_hash_del(HashTable *, zend_string *); +extern zend_result zend_hash_index_del(HashTable *, zend_ulong); +extern zval * zend_hash_find(const HashTable *, zend_string *); +extern zval * zend_hash_add_or_update(HashTable *, zend_string *, zval *, uint32_t); +extern zval * zend_hash_index_add_or_update(HashTable *, zend_ulong, zval *, uint32_t); +extern zval * zend_hash_index_find(const HashTable *, zend_ulong); +extern void zend_hash_destroy(HashTable *); +extern zend_result zend_set_user_opcode_handler(uint8_t, user_opcode_handler_t); +extern user_opcode_handler_t zend_get_user_opcode_handler(uint8_t); +extern void zend_do_inheritance_ex(zend_class_entry *, zend_class_entry *, _Bool); +extern zend_object * zend_objects_new(zend_class_entry *); +extern void zend_object_std_init(zend_object *, zend_class_entry *); +extern void object_properties_init(zend_object *, zend_class_entry *); +extern void zend_objects_store_put(zend_object *); +extern void zend_save_lexical_state(zend_lex_state *); +extern void zend_restore_lexical_state(zend_lex_state *); +extern void zend_prepare_string_for_scanning(zval *, zend_string *); +extern zend_result zend_lex_tstring(zval *, unsigned char *); +extern int zendparse(void); +extern void zend_ast_destroy(zend_ast *); +extern zend_ast * zend_ast_create_list_0(zend_ast_kind); +extern zend_ast * zend_ast_list_add(zend_ast *, zend_ast *); +extern zend_ast * zend_ast_create_zval_ex(zval *, zend_ast_attr); +extern zend_ast * zend_ast_create_0(zend_ast_kind); +extern zend_ast * zend_ast_create_1(zend_ast_kind, zend_ast *); +extern zend_ast * zend_ast_create_2(zend_ast_kind, zend_ast *, zend_ast *); +extern zend_ast * zend_ast_create_3(zend_ast_kind, zend_ast *, zend_ast *, zend_ast *); +extern zend_ast * zend_ast_create_4(zend_ast_kind, zend_ast *, zend_ast *, zend_ast *, zend_ast *); +extern zend_ast * zend_ast_create_5(zend_ast_kind, zend_ast *, zend_ast *, zend_ast *, zend_ast *, zend_ast *); +extern zend_ast * zend_ast_create_decl(zend_ast_kind, uint32_t, uint32_t, zend_string *, zend_string *, zend_ast *, zend_ast *, zend_ast *, zend_ast *, zend_ast *); +extern void destroy_op_array(zend_op_array *); +extern void zend_destroy_static_vars(zend_op_array *); +extern void destroy_zend_class(zval *); +extern HashTable * zend_array_dup(HashTable *); +extern void zend_iterator_init(zend_object_iterator *); +extern zend_module_entry * zend_register_module_ex(zend_module_entry *, int); +extern zend_result zend_startup_module_ex(zend_module_entry *); +extern zend_result zend_register_constant(zend_constant *); +extern void zend_clear_exception(void); +extern void zval_ptr_dtor(zval *); +extern void zval_add_ref(zval *); +extern void rc_dtor_func(zend_refcounted *); +extern zend_string * zend_string_concat2(const char *, size_t, const char *, size_t); +extern zend_ulong zend_string_hash_func(zend_string *); +extern void free(void *); +extern void * tsrm_get_ls_cache(void); + +/* Imported globals */ +extern size_t executor_globals_offset; +extern size_t compiler_globals_offset; +extern HashTable module_registry; +extern const zend_object_handlers std_object_handlers; +extern zend_ast_process_t zend_ast_process; +extern void (*zend_error_cb)(int, zend_string *, const uint32_t, zend_string *); +extern void (*zend_throw_exception_hook)(zend_object *); +extern void (*zend_interrupt_function)(zend_execute_data *); +extern char zend_system_id[32]; diff --git a/include/8.4/linux-x64-zts/layouts.json b/include/8.4/linux-x64-zts/layouts.json new file mode 100644 index 0000000..c5835d3 --- /dev/null +++ b/include/8.4/linux-x64-zts/layouts.json @@ -0,0 +1,682 @@ +{ + "meta": { + "php": "8.4", + "api": 20240924, + "zts": 1, + "debug": 0 + }, + "structs": { + "zval": { + "size": 16, + "fields": { + "value": 0, + "u1": 8, + "u2": 12 + } + }, + "zend_refcounted": { + "size": 8, + "fields": { + "gc": 0 + } + }, + "zend_string": { + "size": 32, + "fields": { + "gc": 0, + "h": 8, + "len": 16, + "val": 24 + } + }, + "zend_array": { + "size": 56, + "fields": { + "gc": 0, + "u": 8, + "nTableMask": 12, + "arHash": 16, + "arData": 16, + "arPacked": 16, + "nNumUsed": 24, + "nNumOfElements": 28, + "nTableSize": 32, + "nInternalPointer": 36, + "nNextFreeElement": 40, + "pDestructor": 48 + } + }, + "Bucket": { + "size": 32, + "fields": { + "val": 0, + "h": 16, + "key": 24 + } + }, + "zend_object": { + "size": 56, + "fields": { + "gc": 0, + "handle": 8, + "extra_flags": 12, + "ce": 16, + "handlers": 24, + "properties": 32, + "properties_table": 40 + } + }, + "zend_resource": { + "size": 32, + "fields": { + "gc": 0, + "handle": 8, + "type": 16, + "ptr": 24 + } + }, + "zend_reference": { + "size": 32, + "fields": { + "gc": 0, + "val": 8, + "sources": 24 + } + }, + "zend_class_entry": { + "size": 520, + "fields": { + "type": 0, + "name": 8, + "parent": 16, + "parent_name": 16, + "refcount": 24, + "ce_flags": 28, + "default_properties_count": 32, + "default_static_members_count": 36, + "default_properties_table": 40, + "default_static_members_table": 48, + "static_members_table__ptr": 56, + "function_table": 64, + "properties_info": 120, + "constants_table": 176, + "mutable_data__ptr": 232, + "inheritance_cache": 240, + "properties_info_table": 248, + "constructor": 256, + "destructor": 264, + "clone": 272, + "__get": 280, + "__set": 288, + "__unset": 296, + "__isset": 304, + "__call": 312, + "__callstatic": 320, + "__tostring": 328, + "__debugInfo": 336, + "__serialize": 344, + "__unserialize": 352, + "default_object_handlers": 360, + "iterator_funcs_ptr": 368, + "arrayaccess_funcs_ptr": 376, + "create_object": 384, + "interface_gets_implemented": 384, + "get_iterator": 392, + "get_static_method": 400, + "serialize": 408, + "unserialize": 416, + "num_interfaces": 424, + "num_traits": 428, + "num_hooked_props": 432, + "num_hooked_prop_variance_checks": 436, + "interfaces": 440, + "interface_names": 440, + "trait_names": 448, + "trait_aliases": 456, + "trait_precedences": 464, + "attributes": 472, + "enum_backing_type": 480, + "backed_enum_table": 488, + "doc_comment": 496, + "info": 504 + } + }, + "zend_class_constant": { + "size": 56, + "fields": { + "value": 0, + "doc_comment": 16, + "attributes": 24, + "ce": 32, + "type": 40 + } + }, + "zend_class_name": { + "size": 16, + "fields": { + "name": 0, + "lc_name": 8 + } + }, + "zend_property_info": { + "size": 72, + "fields": { + "offset": 0, + "flags": 4, + "name": 8, + "doc_comment": 16, + "attributes": 24, + "ce": 32, + "type": 40, + "prototype": 56, + "hooks": 64 + } + }, + "zend_type_list": { + "size": 24, + "fields": { + "num_types": 0, + "types": 8 + } + }, + "zend_constant": { + "size": 24, + "fields": { + "value": 0, + "name": 16 + } + }, + "zend_attribute": { + "size": 56, + "fields": { + "name": 0, + "lcname": 8, + "flags": 16, + "lineno": 20, + "offset": 24, + "argc": 28, + "args": 32 + } + }, + "zend_attribute_arg": { + "size": 24, + "fields": { + "name": 0, + "value": 8 + } + }, + "zend_op_array": { + "size": 256, + "fields": { + "type": 0, + "arg_flags": 1, + "fn_flags": 4, + "function_name": 8, + "scope": 16, + "prototype": 24, + "num_args": 32, + "required_num_args": 36, + "arg_info": 40, + "attributes": 48, + "run_time_cache__ptr": 56, + "doc_comment": 64, + "T": 72, + "prop_info": 80, + "cache_size": 88, + "last_var": 92, + "last": 96, + "opcodes": 104, + "static_variables_ptr__ptr": 112, + "static_variables": 120, + "vars": 128, + "refcount": 136, + "last_live_range": 144, + "last_try_catch": 148, + "live_range": 152, + "try_catch_array": 160, + "filename": 168, + "line_start": 176, + "line_end": 180, + "last_literal": 184, + "num_dynamic_func_defs": 188, + "literals": 192, + "dynamic_func_defs": 200, + "reserved": 208 + } + }, + "zend_internal_function": { + "size": 160, + "fields": { + "type": 0, + "arg_flags": 1, + "fn_flags": 4, + "function_name": 8, + "scope": 16, + "prototype": 24, + "num_args": 32, + "required_num_args": 36, + "arg_info": 40, + "attributes": 48, + "run_time_cache__ptr": 56, + "doc_comment": 64, + "T": 72, + "prop_info": 80, + "handler": 88, + "module": 96, + "frameless_function_infos": 104, + "reserved": 112 + } + }, + "zend_op": { + "size": 32, + "fields": { + "handler": 0, + "op1": 8, + "op2": 12, + "result": 16, + "extended_value": 20, + "lineno": 24, + "opcode": 28, + "op1_type": 29, + "op2_type": 30, + "result_type": 31 + } + }, + "zend_execute_data": { + "size": 80, + "fields": { + "opline": 0, + "call": 8, + "return_value": 16, + "func": 24, + "This": 32, + "prev_execute_data": 48, + "symbol_table": 56, + "run_time_cache": 64, + "extra_named_params": 72 + } + }, + "zend_objects_store": { + "size": 24, + "fields": { + "object_buckets": 0, + "top": 8, + "size": 12, + "free_list_head": 16 + } + }, + "zend_executor_globals": { + "size": 2128, + "fields": { + "uninitialized_zval": 0, + "error_zval": 16, + "symtable_cache": 32, + "symtable_cache_limit": 288, + "symtable_cache_ptr": 296, + "symbol_table": 304, + "included_files": 360, + "bailout": 416, + "error_reporting": 424, + "exit_status": 428, + "function_table": 432, + "class_table": 440, + "zend_constants": 448, + "vm_stack_top": 456, + "vm_stack_end": 464, + "vm_stack": 472, + "vm_stack_page_size": 480, + "current_execute_data": 488, + "fake_scope": 496, + "jit_trace_num": 504, + "current_observed_frame": 512, + "ticks_count": 520, + "precision": 528, + "persistent_constants_count": 536, + "persistent_functions_count": 540, + "persistent_classes_count": 544, + "no_extensions": 548, + "full_tables_cleanup": 549, + "vm_interrupt": 550, + "timed_out": 551, + "in_autoload": 552, + "hard_timeout": 560, + "stack_base": 568, + "stack_limit": 576, + "regular_list": 584, + "persistent_list": 640, + "user_error_handler_error_reporting": 696, + "exception_ignore_args": 700, + "user_error_handler": 704, + "user_exception_handler": 720, + "user_error_handlers_error_reporting": 736, + "user_error_handlers": 760, + "user_exception_handlers": 784, + "exception_class": 808, + "error_handling": 816, + "capture_warnings_during_sccp": 820, + "timeout_seconds": 824, + "ini_directives": 832, + "modified_ini_directives": 840, + "error_reporting_ini_entry": 848, + "objects_store": 856, + "lazy_objects_store": 880, + "exception": 936, + "prev_exception": 944, + "opline_before_exception": 952, + "exception_op": 960, + "current_module": 1056, + "active": 1064, + "flags": 1065, + "assertions": 1072, + "ht_iterators_count": 1080, + "ht_iterators_used": 1084, + "ht_iterators": 1088, + "ht_iterators_slots": 1096, + "saved_fpu_cw_ptr": 1352, + "trampoline": 1360, + "call_trampoline_op": 1616, + "weakrefs": 1648, + "exception_string_param_max_len": 1704, + "get_gc_buffer": 1712, + "main_fiber_context": 1736, + "current_fiber_context": 1744, + "active_fiber": 1752, + "fiber_stack_size": 1760, + "record_errors": 1768, + "num_errors": 1772, + "errors": 1776, + "filename_override": 1784, + "lineno_override": 1792, + "call_stack": 1800, + "max_allowed_stack_size": 1816, + "reserved_stack_size": 1824, + "max_execution_timer_timer": 1832, + "pid": 1840, + "oldact": 1848, + "strtod_state": 2000, + "reserved": 2080 + } + }, + "zend_compiler_globals": { + "size": 624, + "fields": { + "loop_var_stack": 0, + "active_class_entry": 24, + "compiled_filename": 32, + "zend_lineno": 40, + "active_op_array": 48, + "function_table": 56, + "class_table": 64, + "auto_globals": 72, + "parse_error": 80, + "in_compilation": 81, + "short_tags": 82, + "unclean_shutdown": 83, + "ini_parser_unbuffered_errors": 84, + "open_files": 88, + "ini_parser_param": 144, + "skip_shebang": 152, + "increment_lineno": 153, + "variable_width_locale": 154, + "ascii_compatible_locale": 155, + "doc_comment": 160, + "extra_fn_flags": 168, + "compiler_options": 172, + "context": 176, + "file_context": 256, + "arena": 360, + "interned_strings": 368, + "script_encoding_list": 424, + "script_encoding_list_size": 432, + "multibyte": 440, + "detect_unicode": 441, + "encoding_declared": 442, + "ast": 448, + "ast_arena": 456, + "delayed_oplines_stack": 464, + "memoized_exprs": 488, + "memoize_mode": 496, + "map_ptr_real_base": 504, + "map_ptr_base": 512, + "map_ptr_size": 520, + "map_ptr_last": 528, + "delayed_variance_obligations": 536, + "delayed_autoloads": 544, + "unlinked_uses": 552, + "current_linking_class": 560, + "rtd_key_counter": 568, + "internal_run_time_cache": 576, + "internal_run_time_cache_size": 584, + "short_circuiting_opnums": 592, + "copied_functions_count": 616 + } + }, + "zend_module_entry": { + "size": 168, + "fields": { + "size": 0, + "zend_api": 4, + "zend_debug": 8, + "zts": 9, + "ini_entry": 16, + "deps": 24, + "name": 32, + "functions": 40, + "module_startup_func": 48, + "module_shutdown_func": 56, + "request_startup_func": 64, + "request_shutdown_func": 72, + "info_func": 80, + "version": 88, + "globals_size": 96, + "globals_id_ptr": 104, + "globals_ctor": 112, + "globals_dtor": 120, + "post_deactivate_func": 128, + "module_started": 136, + "type": 140, + "handle": 144, + "module_number": 152, + "build_id": 160 + } + }, + "zend_module_dep": { + "size": 32, + "fields": { + "name": 0, + "rel": 8, + "version": 16, + "type": 24 + } + }, + "zend_object_handlers": { + "size": 200, + "fields": { + "offset": 0, + "free_obj": 8, + "dtor_obj": 16, + "clone_obj": 24, + "read_property": 32, + "write_property": 40, + "read_dimension": 48, + "write_dimension": 56, + "get_property_ptr_ptr": 64, + "has_property": 72, + "unset_property": 80, + "has_dimension": 88, + "unset_dimension": 96, + "get_properties": 104, + "get_method": 112, + "get_constructor": 120, + "get_class_name": 128, + "cast_object": 136, + "count_elements": 144, + "get_debug_info": 152, + "get_closure": 160, + "get_gc": 168, + "do_operation": 176, + "compare": 184, + "get_properties_for": 192 + } + }, + "zend_object_iterator": { + "size": 88, + "fields": { + "std": 0, + "data": 56, + "funcs": 72, + "index": 80 + } + }, + "zend_object_iterator_funcs": { + "size": 64, + "fields": { + "dtor": 0, + "valid": 8, + "get_current_data": 16, + "get_current_key": 24, + "move_forward": 32, + "rewind": 40, + "invalidate_current": 48, + "get_gc": 56 + } + }, + "zend_ast": { + "size": 16, + "fields": { + "kind": 0, + "attr": 2, + "lineno": 4, + "child": 8 + } + }, + "zend_ast_decl": { + "size": 72, + "fields": { + "kind": 0, + "attr": 2, + "start_lineno": 4, + "end_lineno": 8, + "flags": 12, + "doc_comment": 16, + "name": 24, + "child": 32 + } + }, + "zend_ast_list": { + "size": 24, + "fields": { + "kind": 0, + "attr": 2, + "lineno": 4, + "children": 8, + "child": 16 + } + }, + "zend_ast_zval": { + "size": 24, + "fields": { + "kind": 0, + "attr": 2, + "val": 8 + } + }, + "zend_lex_state": { + "size": 248, + "fields": { + "yy_leng": 0, + "yy_start": 8, + "yy_text": 16, + "yy_cursor": 24, + "yy_marker": 32, + "yy_limit": 40, + "yy_state": 48, + "state_stack": 56, + "heredoc_label_stack": 80, + "nest_location_stack": 112, + "in": 136, + "lineno": 144, + "filename": 152, + "script_org": 160, + "script_org_size": 168, + "script_filtered": 176, + "script_filtered_size": 184, + "input_filter": 192, + "output_filter": 200, + "script_encoding": 208, + "on_event": 216, + "on_event_context": 224, + "ast": 232, + "ast_arena": 240 + } + }, + "zend_closure": { + "size": 344, + "fields": { + "std": 0, + "func": 56, + "this_ptr": 312, + "called_scope": 328, + "orig_internal_handler": 336 + } + }, + "zend_script": { + "size": 376, + "fields": { + "filename": 0, + "main_op_array": 8, + "function_table": 264, + "class_table": 320 + } + }, + "zend_error_info": { + "size": 24, + "fields": { + "type": 0, + "lineno": 4, + "filename": 8, + "message": 16 + } + }, + "zend_early_binding": { + "size": 32, + "fields": { + "lcname": 0, + "rtd_key": 8, + "lc_parent_name": 16, + "cache_slot": 24 + } + }, + "zend_persistent_script": { + "size": 480, + "fields": { + "script": 0, + "compiler_halt_offset": 376, + "ping_auto_globals_mask": 384, + "timestamp": 392, + "corrupted": 400, + "is_phar": 401, + "empty": 402, + "num_warnings": 404, + "num_early_bindings": 408, + "warnings": 416, + "early_bindings": 424, + "mem": 432, + "size": 440, + "dynamic_members": 448 + } + }, + "zend_file_cache_metainfo": { + "size": 80, + "fields": { + "magic": 0, + "system_id": 8, + "mem_size": 40, + "str_size": 48, + "script_offset": 56, + "timestamp": 64, + "checksum": 72 + } + } + } +} diff --git a/include/8.4/linux-x64-zts/probe.c b/include/8.4/linux-x64-zts/probe.c new file mode 100644 index 0000000..467a837 --- /dev/null +++ b/include/8.4/linux-x64-zts/probe.c @@ -0,0 +1,1525 @@ +#include "php.h" +#include "zend_ast.h" +#include "zend_attributes.h" +#include "zend_language_scanner.h" +#include "zend_inheritance.h" +#include "zend_hash.h" +#include "zend_modules.h" +#include "zend_arena.h" +#include "zend_exceptions.h" +#include "Optimizer/zend_optimizer.h" +#include "supplement.h" +#include + +int main(void) { + FILE *constants = fopen("constants.php", "w"); + FILE *layouts = fopen("layouts.json", "w"); + if (!constants || !layouts) { return 1; } + fputs(" %lld,\n", (long long)(ZEND_ACC_PUBLIC)); +#endif +#ifdef ZEND_ACC_PROTECTED + fprintf(constants, " 'ZEND_ACC_PROTECTED' => %lld,\n", (long long)(ZEND_ACC_PROTECTED)); +#endif +#ifdef ZEND_ACC_PRIVATE + fprintf(constants, " 'ZEND_ACC_PRIVATE' => %lld,\n", (long long)(ZEND_ACC_PRIVATE)); +#endif +#ifdef ZEND_ACC_CHANGED + fprintf(constants, " 'ZEND_ACC_CHANGED' => %lld,\n", (long long)(ZEND_ACC_CHANGED)); +#endif +#ifdef ZEND_ACC_STATIC + fprintf(constants, " 'ZEND_ACC_STATIC' => %lld,\n", (long long)(ZEND_ACC_STATIC)); +#endif +#ifdef ZEND_ACC_ABSTRACT + fprintf(constants, " 'ZEND_ACC_ABSTRACT' => %lld,\n", (long long)(ZEND_ACC_ABSTRACT)); +#endif +#ifdef ZEND_ACC_FINAL + fprintf(constants, " 'ZEND_ACC_FINAL' => %lld,\n", (long long)(ZEND_ACC_FINAL)); +#endif +#ifdef ZEND_ACC_DEPRECATED + fprintf(constants, " 'ZEND_ACC_DEPRECATED' => %lld,\n", (long long)(ZEND_ACC_DEPRECATED)); +#endif +#ifdef ZEND_ACC_INTERFACE + fprintf(constants, " 'ZEND_ACC_INTERFACE' => %lld,\n", (long long)(ZEND_ACC_INTERFACE)); +#endif +#ifdef ZEND_ACC_TRAIT + fprintf(constants, " 'ZEND_ACC_TRAIT' => %lld,\n", (long long)(ZEND_ACC_TRAIT)); +#endif +#ifdef ZEND_ACC_ANON_CLASS + fprintf(constants, " 'ZEND_ACC_ANON_CLASS' => %lld,\n", (long long)(ZEND_ACC_ANON_CLASS)); +#endif +#ifdef ZEND_ACC_ENUM + fprintf(constants, " 'ZEND_ACC_ENUM' => %lld,\n", (long long)(ZEND_ACC_ENUM)); +#endif +#ifdef ZEND_ACC_IMPLICIT_ABSTRACT_CLASS + fprintf(constants, " 'ZEND_ACC_IMPLICIT_ABSTRACT_CLASS' => %lld,\n", (long long)(ZEND_ACC_IMPLICIT_ABSTRACT_CLASS)); +#endif +#ifdef ZEND_ACC_LINKED + fprintf(constants, " 'ZEND_ACC_LINKED' => %lld,\n", (long long)(ZEND_ACC_LINKED)); +#endif +#ifdef ZEND_ACC_IMMUTABLE + fprintf(constants, " 'ZEND_ACC_IMMUTABLE' => %lld,\n", (long long)(ZEND_ACC_IMMUTABLE)); +#endif +#ifdef ZEND_ACC_USE_GUARDS + fprintf(constants, " 'ZEND_ACC_USE_GUARDS' => %lld,\n", (long long)(ZEND_ACC_USE_GUARDS)); +#endif +#ifdef ZEND_ACC_CONSTANTS_UPDATED + fprintf(constants, " 'ZEND_ACC_CONSTANTS_UPDATED' => %lld,\n", (long long)(ZEND_ACC_CONSTANTS_UPDATED)); +#endif +#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES + fprintf(constants, " 'ZEND_ACC_NO_DYNAMIC_PROPERTIES' => %lld,\n", (long long)(ZEND_ACC_NO_DYNAMIC_PROPERTIES)); +#endif +#ifdef ZEND_ACC_HAS_STATIC_IN_METHODS + fprintf(constants, " 'ZEND_ACC_HAS_STATIC_IN_METHODS' => %lld,\n", (long long)(ZEND_ACC_HAS_STATIC_IN_METHODS)); +#endif +#ifdef ZEND_HAS_STATIC_IN_METHODS + fprintf(constants, " 'ZEND_HAS_STATIC_IN_METHODS' => %lld,\n", (long long)(ZEND_HAS_STATIC_IN_METHODS)); +#endif +#ifdef ZEND_ACC_TOP_LEVEL + fprintf(constants, " 'ZEND_ACC_TOP_LEVEL' => %lld,\n", (long long)(ZEND_ACC_TOP_LEVEL)); +#endif +#ifdef ZEND_ACC_PRELOADED + fprintf(constants, " 'ZEND_ACC_PRELOADED' => %lld,\n", (long long)(ZEND_ACC_PRELOADED)); +#endif +#ifdef ZEND_ACC_NOT_SERIALIZABLE + fprintf(constants, " 'ZEND_ACC_NOT_SERIALIZABLE' => %lld,\n", (long long)(ZEND_ACC_NOT_SERIALIZABLE)); +#endif +#ifdef ZEND_ACC_READONLY_CLASS + fprintf(constants, " 'ZEND_ACC_READONLY_CLASS' => %lld,\n", (long long)(ZEND_ACC_READONLY_CLASS)); +#endif +#ifdef ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES + fprintf(constants, " 'ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES' => %lld,\n", (long long)(ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES)); +#endif +#ifdef ZEND_ACC_UNRESOLVED_VARIANCE + fprintf(constants, " 'ZEND_ACC_UNRESOLVED_VARIANCE' => %lld,\n", (long long)(ZEND_ACC_UNRESOLVED_VARIANCE)); +#endif +#ifdef ZEND_ACC_NEARLY_LINKED + fprintf(constants, " 'ZEND_ACC_NEARLY_LINKED' => %lld,\n", (long long)(ZEND_ACC_NEARLY_LINKED)); +#endif +#ifdef ZEND_ACC_RESOLVED_PARENT + fprintf(constants, " 'ZEND_ACC_RESOLVED_PARENT' => %lld,\n", (long long)(ZEND_ACC_RESOLVED_PARENT)); +#endif +#ifdef ZEND_ACC_RESOLVED_INTERFACES + fprintf(constants, " 'ZEND_ACC_RESOLVED_INTERFACES' => %lld,\n", (long long)(ZEND_ACC_RESOLVED_INTERFACES)); +#endif +#ifdef ZEND_ACC_HAS_UNLINKED_USES + fprintf(constants, " 'ZEND_ACC_HAS_UNLINKED_USES' => %lld,\n", (long long)(ZEND_ACC_HAS_UNLINKED_USES)); +#endif +#ifdef ZEND_ACC_PROPERTY_TYPES_RESOLVED + fprintf(constants, " 'ZEND_ACC_PROPERTY_TYPES_RESOLVED' => %lld,\n", (long long)(ZEND_ACC_PROPERTY_TYPES_RESOLVED)); +#endif +#ifdef ZEND_ACC_REUSE_GET_ITERATOR + fprintf(constants, " 'ZEND_ACC_REUSE_GET_ITERATOR' => %lld,\n", (long long)(ZEND_ACC_REUSE_GET_ITERATOR)); +#endif +#ifdef ZEND_ACC_EXPLICIT_ABSTRACT_CLASS + fprintf(constants, " 'ZEND_ACC_EXPLICIT_ABSTRACT_CLASS' => %lld,\n", (long long)(ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)); +#endif +#ifdef ZEND_ACC_READONLY + fprintf(constants, " 'ZEND_ACC_READONLY' => %lld,\n", (long long)(ZEND_ACC_READONLY)); +#endif +#ifdef ZEND_ACC_ABSTRACT_METHOD + fprintf(constants, " 'ZEND_ACC_ABSTRACT_METHOD' => %lld,\n", (long long)(ZEND_ACC_ABSTRACT_METHOD)); +#endif +#ifdef ZEND_ACC_VIRTUAL + fprintf(constants, " 'ZEND_ACC_VIRTUAL' => %lld,\n", (long long)(ZEND_ACC_VIRTUAL)); +#endif +#ifdef ZEND_ACC_FAKE_CLOSURE + fprintf(constants, " 'ZEND_ACC_FAKE_CLOSURE' => %lld,\n", (long long)(ZEND_ACC_FAKE_CLOSURE)); +#endif +#ifdef ZEND_ACC_UNINSTANTIABLE + fprintf(constants, " 'ZEND_ACC_UNINSTANTIABLE' => %lld,\n", (long long)(ZEND_ACC_UNINSTANTIABLE)); +#endif +#ifdef ZEND_ACC_CALL_VIA_TRAMPOLINE + fprintf(constants, " 'ZEND_ACC_CALL_VIA_TRAMPOLINE' => %lld,\n", (long long)(ZEND_ACC_CALL_VIA_TRAMPOLINE)); +#endif +#ifdef ZEND_ACC_NEVER_CACHE + fprintf(constants, " 'ZEND_ACC_NEVER_CACHE' => %lld,\n", (long long)(ZEND_ACC_NEVER_CACHE)); +#endif +#ifdef ZEND_ACC_TRAIT_CLONE + fprintf(constants, " 'ZEND_ACC_TRAIT_CLONE' => %lld,\n", (long long)(ZEND_ACC_TRAIT_CLONE)); +#endif +#ifdef ZEND_ACC_RETURN_REFERENCE + fprintf(constants, " 'ZEND_ACC_RETURN_REFERENCE' => %lld,\n", (long long)(ZEND_ACC_RETURN_REFERENCE)); +#endif +#ifdef ZEND_ACC_DONE_PASS_TWO + fprintf(constants, " 'ZEND_ACC_DONE_PASS_TWO' => %lld,\n", (long long)(ZEND_ACC_DONE_PASS_TWO)); +#endif +#ifdef ZEND_ACC_HEAP_RT_CACHE + fprintf(constants, " 'ZEND_ACC_HEAP_RT_CACHE' => %lld,\n", (long long)(ZEND_ACC_HEAP_RT_CACHE)); +#endif +#ifdef ZEND_ACC_STRICT_TYPES + fprintf(constants, " 'ZEND_ACC_STRICT_TYPES' => %lld,\n", (long long)(ZEND_ACC_STRICT_TYPES)); +#endif +#ifdef ZEND_ACC_CLOSURE + fprintf(constants, " 'ZEND_ACC_CLOSURE' => %lld,\n", (long long)(ZEND_ACC_CLOSURE)); +#endif +#ifdef ZEND_ACC_GENERATOR + fprintf(constants, " 'ZEND_ACC_GENERATOR' => %lld,\n", (long long)(ZEND_ACC_GENERATOR)); +#endif +#ifdef ZEND_ACC_HAS_FINALLY_BLOCK + fprintf(constants, " 'ZEND_ACC_HAS_FINALLY_BLOCK' => %lld,\n", (long long)(ZEND_ACC_HAS_FINALLY_BLOCK)); +#endif +#ifdef ZEND_ACC_EARLY_BINDING + fprintf(constants, " 'ZEND_ACC_EARLY_BINDING' => %lld,\n", (long long)(ZEND_ACC_EARLY_BINDING)); +#endif +#ifdef ZEND_ACC_USES_THIS + fprintf(constants, " 'ZEND_ACC_USES_THIS' => %lld,\n", (long long)(ZEND_ACC_USES_THIS)); +#endif +#ifdef ZEND_ACC_CTOR + fprintf(constants, " 'ZEND_ACC_CTOR' => %lld,\n", (long long)(ZEND_ACC_CTOR)); +#endif +#ifdef ZEND_ACC_HAS_TYPE_HINTS + fprintf(constants, " 'ZEND_ACC_HAS_TYPE_HINTS' => %lld,\n", (long long)(ZEND_ACC_HAS_TYPE_HINTS)); +#endif +#ifdef ZEND_ACC_HAS_RETURN_TYPE + fprintf(constants, " 'ZEND_ACC_HAS_RETURN_TYPE' => %lld,\n", (long long)(ZEND_ACC_HAS_RETURN_TYPE)); +#endif +#ifdef ZEND_ACC_VARIADIC + fprintf(constants, " 'ZEND_ACC_VARIADIC' => %lld,\n", (long long)(ZEND_ACC_VARIADIC)); +#endif +#ifdef ZEND_ACC_HAS_UNRESOLVED_INITIALIZERS + fprintf(constants, " 'ZEND_ACC_HAS_UNRESOLVED_INITIALIZERS' => %lld,\n", (long long)(ZEND_ACC_HAS_UNRESOLVED_INITIALIZERS)); +#endif +#ifdef ZEND_ACC_CACHED + fprintf(constants, " 'ZEND_ACC_CACHED' => %lld,\n", (long long)(ZEND_ACC_CACHED)); +#endif +#ifdef ZEND_ACC_FILE_CACHED + fprintf(constants, " 'ZEND_ACC_FILE_CACHED' => %lld,\n", (long long)(ZEND_ACC_FILE_CACHED)); +#endif +#ifdef ZEND_ACC_ARENA_ALLOCATED + fprintf(constants, " 'ZEND_ACC_ARENA_ALLOCATED' => %lld,\n", (long long)(ZEND_ACC_ARENA_ALLOCATED)); +#endif +#ifdef _ZEND_TYPE_EXTRA_FLAGS_SHIFT + fprintf(constants, " '_ZEND_TYPE_EXTRA_FLAGS_SHIFT' => %lld,\n", (long long)(_ZEND_TYPE_EXTRA_FLAGS_SHIFT)); +#endif +#ifdef _ZEND_TYPE_MASK + fprintf(constants, " '_ZEND_TYPE_MASK' => %lld,\n", (long long)(_ZEND_TYPE_MASK)); +#endif +#ifdef _ZEND_TYPE_NAME_BIT + fprintf(constants, " '_ZEND_TYPE_NAME_BIT' => %lld,\n", (long long)(_ZEND_TYPE_NAME_BIT)); +#endif +#ifdef _ZEND_TYPE_LITERAL_NAME_BIT + fprintf(constants, " '_ZEND_TYPE_LITERAL_NAME_BIT' => %lld,\n", (long long)(_ZEND_TYPE_LITERAL_NAME_BIT)); +#endif +#ifdef _ZEND_TYPE_LIST_BIT + fprintf(constants, " '_ZEND_TYPE_LIST_BIT' => %lld,\n", (long long)(_ZEND_TYPE_LIST_BIT)); +#endif +#ifdef _ZEND_TYPE_KIND_MASK + fprintf(constants, " '_ZEND_TYPE_KIND_MASK' => %lld,\n", (long long)(_ZEND_TYPE_KIND_MASK)); +#endif +#ifdef _ZEND_TYPE_ITERABLE_BIT + fprintf(constants, " '_ZEND_TYPE_ITERABLE_BIT' => %lld,\n", (long long)(_ZEND_TYPE_ITERABLE_BIT)); +#endif +#ifdef _ZEND_TYPE_ARENA_BIT + fprintf(constants, " '_ZEND_TYPE_ARENA_BIT' => %lld,\n", (long long)(_ZEND_TYPE_ARENA_BIT)); +#endif +#ifdef _ZEND_TYPE_INTERSECTION_BIT + fprintf(constants, " '_ZEND_TYPE_INTERSECTION_BIT' => %lld,\n", (long long)(_ZEND_TYPE_INTERSECTION_BIT)); +#endif +#ifdef _ZEND_TYPE_UNION_BIT + fprintf(constants, " '_ZEND_TYPE_UNION_BIT' => %lld,\n", (long long)(_ZEND_TYPE_UNION_BIT)); +#endif +#ifdef _ZEND_TYPE_NULLABLE_BIT + fprintf(constants, " '_ZEND_TYPE_NULLABLE_BIT' => %lld,\n", (long long)(_ZEND_TYPE_NULLABLE_BIT)); +#endif +#ifdef _ZEND_TYPE_MAY_BE_MASK + fprintf(constants, " '_ZEND_TYPE_MAY_BE_MASK' => %lld,\n", (long long)(_ZEND_TYPE_MAY_BE_MASK)); +#endif +#ifdef IS_UNDEF + fprintf(constants, " 'IS_UNDEF' => %lld,\n", (long long)(IS_UNDEF)); +#endif +#ifdef IS_NULL + fprintf(constants, " 'IS_NULL' => %lld,\n", (long long)(IS_NULL)); +#endif +#ifdef IS_FALSE + fprintf(constants, " 'IS_FALSE' => %lld,\n", (long long)(IS_FALSE)); +#endif +#ifdef IS_TRUE + fprintf(constants, " 'IS_TRUE' => %lld,\n", (long long)(IS_TRUE)); +#endif +#ifdef IS_LONG + fprintf(constants, " 'IS_LONG' => %lld,\n", (long long)(IS_LONG)); +#endif +#ifdef IS_DOUBLE + fprintf(constants, " 'IS_DOUBLE' => %lld,\n", (long long)(IS_DOUBLE)); +#endif +#ifdef IS_STRING + fprintf(constants, " 'IS_STRING' => %lld,\n", (long long)(IS_STRING)); +#endif +#ifdef IS_ARRAY + fprintf(constants, " 'IS_ARRAY' => %lld,\n", (long long)(IS_ARRAY)); +#endif +#ifdef IS_OBJECT + fprintf(constants, " 'IS_OBJECT' => %lld,\n", (long long)(IS_OBJECT)); +#endif +#ifdef IS_RESOURCE + fprintf(constants, " 'IS_RESOURCE' => %lld,\n", (long long)(IS_RESOURCE)); +#endif +#ifdef IS_REFERENCE + fprintf(constants, " 'IS_REFERENCE' => %lld,\n", (long long)(IS_REFERENCE)); +#endif +#ifdef IS_CONSTANT_AST + fprintf(constants, " 'IS_CONSTANT_AST' => %lld,\n", (long long)(IS_CONSTANT_AST)); +#endif +#ifdef IS_CALLABLE + fprintf(constants, " 'IS_CALLABLE' => %lld,\n", (long long)(IS_CALLABLE)); +#endif +#ifdef IS_ITERABLE + fprintf(constants, " 'IS_ITERABLE' => %lld,\n", (long long)(IS_ITERABLE)); +#endif +#ifdef IS_VOID + fprintf(constants, " 'IS_VOID' => %lld,\n", (long long)(IS_VOID)); +#endif +#ifdef IS_STATIC + fprintf(constants, " 'IS_STATIC' => %lld,\n", (long long)(IS_STATIC)); +#endif +#ifdef IS_MIXED + fprintf(constants, " 'IS_MIXED' => %lld,\n", (long long)(IS_MIXED)); +#endif +#ifdef IS_NEVER + fprintf(constants, " 'IS_NEVER' => %lld,\n", (long long)(IS_NEVER)); +#endif +#ifdef IS_INDIRECT + fprintf(constants, " 'IS_INDIRECT' => %lld,\n", (long long)(IS_INDIRECT)); +#endif +#ifdef IS_PTR + fprintf(constants, " 'IS_PTR' => %lld,\n", (long long)(IS_PTR)); +#endif +#ifdef IS_ALIAS_PTR + fprintf(constants, " 'IS_ALIAS_PTR' => %lld,\n", (long long)(IS_ALIAS_PTR)); +#endif +#ifdef _IS_ERROR + fprintf(constants, " '_IS_ERROR' => %lld,\n", (long long)(_IS_ERROR)); +#endif +#ifdef _IS_BOOL + fprintf(constants, " '_IS_BOOL' => %lld,\n", (long long)(_IS_BOOL)); +#endif +#ifdef _IS_NUMBER + fprintf(constants, " '_IS_NUMBER' => %lld,\n", (long long)(_IS_NUMBER)); +#endif +#ifdef IS_TYPE_REFCOUNTED + fprintf(constants, " 'IS_TYPE_REFCOUNTED' => %lld,\n", (long long)(IS_TYPE_REFCOUNTED)); +#endif +#ifdef IS_TYPE_COLLECTABLE + fprintf(constants, " 'IS_TYPE_COLLECTABLE' => %lld,\n", (long long)(IS_TYPE_COLLECTABLE)); +#endif +#ifdef Z_TYPE_MASK + fprintf(constants, " 'Z_TYPE_MASK' => %lld,\n", (long long)(Z_TYPE_MASK)); +#endif +#ifdef Z_TYPE_FLAGS_MASK + fprintf(constants, " 'Z_TYPE_FLAGS_MASK' => %lld,\n", (long long)(Z_TYPE_FLAGS_MASK)); +#endif +#ifdef Z_TYPE_FLAGS_SHIFT + fprintf(constants, " 'Z_TYPE_FLAGS_SHIFT' => %lld,\n", (long long)(Z_TYPE_FLAGS_SHIFT)); +#endif +#ifdef GC_TYPE_MASK + fprintf(constants, " 'GC_TYPE_MASK' => %lld,\n", (long long)(GC_TYPE_MASK)); +#endif +#ifdef GC_FLAGS_MASK + fprintf(constants, " 'GC_FLAGS_MASK' => %lld,\n", (long long)(GC_FLAGS_MASK)); +#endif +#ifdef GC_INFO_MASK + fprintf(constants, " 'GC_INFO_MASK' => %lld,\n", (long long)(GC_INFO_MASK)); +#endif +#ifdef GC_FLAGS_SHIFT + fprintf(constants, " 'GC_FLAGS_SHIFT' => %lld,\n", (long long)(GC_FLAGS_SHIFT)); +#endif +#ifdef GC_INFO_SHIFT + fprintf(constants, " 'GC_INFO_SHIFT' => %lld,\n", (long long)(GC_INFO_SHIFT)); +#endif +#ifdef GC_NULL + fprintf(constants, " 'GC_NULL' => %lld,\n", (long long)(GC_NULL)); +#endif +#ifdef GC_STRING + fprintf(constants, " 'GC_STRING' => %lld,\n", (long long)(GC_STRING)); +#endif +#ifdef GC_ARRAY + fprintf(constants, " 'GC_ARRAY' => %lld,\n", (long long)(GC_ARRAY)); +#endif +#ifdef GC_OBJECT + fprintf(constants, " 'GC_OBJECT' => %lld,\n", (long long)(GC_OBJECT)); +#endif +#ifdef GC_RESOURCE + fprintf(constants, " 'GC_RESOURCE' => %lld,\n", (long long)(GC_RESOURCE)); +#endif +#ifdef GC_REFERENCE + fprintf(constants, " 'GC_REFERENCE' => %lld,\n", (long long)(GC_REFERENCE)); +#endif +#ifdef GC_CONSTANT_AST + fprintf(constants, " 'GC_CONSTANT_AST' => %lld,\n", (long long)(GC_CONSTANT_AST)); +#endif +#ifdef GC_NOT_COLLECTABLE + fprintf(constants, " 'GC_NOT_COLLECTABLE' => %lld,\n", (long long)(GC_NOT_COLLECTABLE)); +#endif +#ifdef GC_PROTECTED + fprintf(constants, " 'GC_PROTECTED' => %lld,\n", (long long)(GC_PROTECTED)); +#endif +#ifdef GC_IMMUTABLE + fprintf(constants, " 'GC_IMMUTABLE' => %lld,\n", (long long)(GC_IMMUTABLE)); +#endif +#ifdef GC_PERSISTENT + fprintf(constants, " 'GC_PERSISTENT' => %lld,\n", (long long)(GC_PERSISTENT)); +#endif +#ifdef GC_PERSISTENT_LOCAL + fprintf(constants, " 'GC_PERSISTENT_LOCAL' => %lld,\n", (long long)(GC_PERSISTENT_LOCAL)); +#endif +#ifdef IS_STR_CLASS_NAME_MAP_PTR + fprintf(constants, " 'IS_STR_CLASS_NAME_MAP_PTR' => %lld,\n", (long long)(IS_STR_CLASS_NAME_MAP_PTR)); +#endif +#ifdef IS_STR_INTERNED + fprintf(constants, " 'IS_STR_INTERNED' => %lld,\n", (long long)(IS_STR_INTERNED)); +#endif +#ifdef IS_STR_PERSISTENT + fprintf(constants, " 'IS_STR_PERSISTENT' => %lld,\n", (long long)(IS_STR_PERSISTENT)); +#endif +#ifdef IS_STR_PERMANENT + fprintf(constants, " 'IS_STR_PERMANENT' => %lld,\n", (long long)(IS_STR_PERMANENT)); +#endif +#ifdef IS_STR_VALID_UTF8 + fprintf(constants, " 'IS_STR_VALID_UTF8' => %lld,\n", (long long)(IS_STR_VALID_UTF8)); +#endif +#ifdef IS_ARRAY_IMMUTABLE + fprintf(constants, " 'IS_ARRAY_IMMUTABLE' => %lld,\n", (long long)(IS_ARRAY_IMMUTABLE)); +#endif +#ifdef IS_ARRAY_PERSISTENT + fprintf(constants, " 'IS_ARRAY_PERSISTENT' => %lld,\n", (long long)(IS_ARRAY_PERSISTENT)); +#endif +#ifdef IS_OBJ_WEAKLY_REFERENCED + fprintf(constants, " 'IS_OBJ_WEAKLY_REFERENCED' => %lld,\n", (long long)(IS_OBJ_WEAKLY_REFERENCED)); +#endif +#ifdef IS_OBJ_DESTRUCTOR_CALLED + fprintf(constants, " 'IS_OBJ_DESTRUCTOR_CALLED' => %lld,\n", (long long)(IS_OBJ_DESTRUCTOR_CALLED)); +#endif +#ifdef IS_OBJ_FREE_CALLED + fprintf(constants, " 'IS_OBJ_FREE_CALLED' => %lld,\n", (long long)(IS_OBJ_FREE_CALLED)); +#endif +#ifdef IS_OBJ_LAZY_UNINITIALIZED + fprintf(constants, " 'IS_OBJ_LAZY_UNINITIALIZED' => %lld,\n", (long long)(IS_OBJ_LAZY_UNINITIALIZED)); +#endif +#ifdef IS_OBJ_LAZY_PROXY + fprintf(constants, " 'IS_OBJ_LAZY_PROXY' => %lld,\n", (long long)(IS_OBJ_LAZY_PROXY)); +#endif +#ifdef HASH_FLAG_CONSISTENCY + fprintf(constants, " 'HASH_FLAG_CONSISTENCY' => %lld,\n", (long long)(HASH_FLAG_CONSISTENCY)); +#endif +#ifdef HASH_FLAG_PACKED + fprintf(constants, " 'HASH_FLAG_PACKED' => %lld,\n", (long long)(HASH_FLAG_PACKED)); +#endif +#ifdef HASH_FLAG_UNINITIALIZED + fprintf(constants, " 'HASH_FLAG_UNINITIALIZED' => %lld,\n", (long long)(HASH_FLAG_UNINITIALIZED)); +#endif +#ifdef HASH_FLAG_STATIC_KEYS + fprintf(constants, " 'HASH_FLAG_STATIC_KEYS' => %lld,\n", (long long)(HASH_FLAG_STATIC_KEYS)); +#endif +#ifdef HASH_FLAG_HAS_EMPTY_IND + fprintf(constants, " 'HASH_FLAG_HAS_EMPTY_IND' => %lld,\n", (long long)(HASH_FLAG_HAS_EMPTY_IND)); +#endif +#ifdef HASH_FLAG_ALLOW_COW_VIOLATION + fprintf(constants, " 'HASH_FLAG_ALLOW_COW_VIOLATION' => %lld,\n", (long long)(HASH_FLAG_ALLOW_COW_VIOLATION)); +#endif +#ifdef HASH_UPDATE + fprintf(constants, " 'HASH_UPDATE' => %lld,\n", (long long)(HASH_UPDATE)); +#endif +#ifdef HASH_ADD + fprintf(constants, " 'HASH_ADD' => %lld,\n", (long long)(HASH_ADD)); +#endif +#ifdef HASH_UPDATE_INDIRECT + fprintf(constants, " 'HASH_UPDATE_INDIRECT' => %lld,\n", (long long)(HASH_UPDATE_INDIRECT)); +#endif +#ifdef HASH_ADD_NEW + fprintf(constants, " 'HASH_ADD_NEW' => %lld,\n", (long long)(HASH_ADD_NEW)); +#endif +#ifdef HASH_ADD_NEXT + fprintf(constants, " 'HASH_ADD_NEXT' => %lld,\n", (long long)(HASH_ADD_NEXT)); +#endif +#ifdef HT_MIN_MASK + fprintf(constants, " 'HT_MIN_MASK' => %lld,\n", (long long)(HT_MIN_MASK)); +#endif +#ifdef HT_MIN_SIZE + fprintf(constants, " 'HT_MIN_SIZE' => %lld,\n", (long long)(HT_MIN_SIZE)); +#endif +#ifdef ZEND_MODULE_API_NO + fprintf(constants, " 'ZEND_MODULE_API_NO' => %lld,\n", (long long)(ZEND_MODULE_API_NO)); +#endif +#ifdef MODULE_PERSISTENT + fprintf(constants, " 'MODULE_PERSISTENT' => %lld,\n", (long long)(MODULE_PERSISTENT)); +#endif +#ifdef MODULE_TEMPORARY + fprintf(constants, " 'MODULE_TEMPORARY' => %lld,\n", (long long)(MODULE_TEMPORARY)); +#endif +#ifdef CONST_CS + fprintf(constants, " 'CONST_CS' => %lld,\n", (long long)(CONST_CS)); +#endif +#ifdef CONST_PERSISTENT + fprintf(constants, " 'CONST_PERSISTENT' => %lld,\n", (long long)(CONST_PERSISTENT)); +#endif +#ifdef CONST_NO_FILE_CACHE + fprintf(constants, " 'CONST_NO_FILE_CACHE' => %lld,\n", (long long)(CONST_NO_FILE_CACHE)); +#endif +#ifdef CONST_DEPRECATED + fprintf(constants, " 'CONST_DEPRECATED' => %lld,\n", (long long)(CONST_DEPRECATED)); +#endif +#ifdef CONST_OWNED + fprintf(constants, " 'CONST_OWNED' => %lld,\n", (long long)(CONST_OWNED)); +#endif +#ifdef CONST_RECURSIVE + fprintf(constants, " 'CONST_RECURSIVE' => %lld,\n", (long long)(CONST_RECURSIVE)); +#endif +#ifdef PHP_USER_CONSTANT + fprintf(constants, " 'PHP_USER_CONSTANT' => %lld,\n", (long long)(PHP_USER_CONSTANT)); +#endif +#ifdef ZEND_DEBUG + fprintf(constants, " 'ZEND_DEBUG' => %lld,\n", (long long)(ZEND_DEBUG)); +#endif +#ifdef ZEND_MM_ALIGNMENT + fprintf(constants, " 'ZEND_MM_ALIGNMENT' => %lld,\n", (long long)(ZEND_MM_ALIGNMENT)); +#endif +#ifdef ZEND_MAX_RESERVED_RESOURCES + fprintf(constants, " 'ZEND_MAX_RESERVED_RESOURCES' => %lld,\n", (long long)(ZEND_MAX_RESERVED_RESOURCES)); +#endif +#ifdef ZEND_INTERNAL_FUNCTION + fprintf(constants, " 'ZEND_INTERNAL_FUNCTION' => %lld,\n", (long long)(ZEND_INTERNAL_FUNCTION)); +#endif +#ifdef ZEND_USER_FUNCTION + fprintf(constants, " 'ZEND_USER_FUNCTION' => %lld,\n", (long long)(ZEND_USER_FUNCTION)); +#endif +#ifdef ZEND_EVAL_CODE + fprintf(constants, " 'ZEND_EVAL_CODE' => %lld,\n", (long long)(ZEND_EVAL_CODE)); +#endif +#ifdef ZEND_COMPILE_EXTENDED_STMT + fprintf(constants, " 'ZEND_COMPILE_EXTENDED_STMT' => %lld,\n", (long long)(ZEND_COMPILE_EXTENDED_STMT)); +#endif +#ifdef ZEND_COMPILE_EXTENDED_FCALL + fprintf(constants, " 'ZEND_COMPILE_EXTENDED_FCALL' => %lld,\n", (long long)(ZEND_COMPILE_EXTENDED_FCALL)); +#endif +#ifdef ZEND_COMPILE_EXTENDED_INFO + fprintf(constants, " 'ZEND_COMPILE_EXTENDED_INFO' => %lld,\n", (long long)(ZEND_COMPILE_EXTENDED_INFO)); +#endif +#ifdef ZEND_COMPILE_HANDLE_OP_ARRAY + fprintf(constants, " 'ZEND_COMPILE_HANDLE_OP_ARRAY' => %lld,\n", (long long)(ZEND_COMPILE_HANDLE_OP_ARRAY)); +#endif +#ifdef ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS + fprintf(constants, " 'ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS' => %lld,\n", (long long)(ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS)); +#endif +#ifdef ZEND_COMPILE_DELAYED_BINDING + fprintf(constants, " 'ZEND_COMPILE_DELAYED_BINDING' => %lld,\n", (long long)(ZEND_COMPILE_DELAYED_BINDING)); +#endif +#ifdef ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION + fprintf(constants, " 'ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION' => %lld,\n", (long long)(ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION)); +#endif +#ifdef ZEND_COMPILE_IGNORE_INTERNAL_CLASSES + fprintf(constants, " 'ZEND_COMPILE_IGNORE_INTERNAL_CLASSES' => %lld,\n", (long long)(ZEND_COMPILE_IGNORE_INTERNAL_CLASSES)); +#endif +#ifdef ZEND_COMPILE_IGNORE_USER_FUNCTIONS + fprintf(constants, " 'ZEND_COMPILE_IGNORE_USER_FUNCTIONS' => %lld,\n", (long long)(ZEND_COMPILE_IGNORE_USER_FUNCTIONS)); +#endif +#ifdef ZEND_COMPILE_GUARDS + fprintf(constants, " 'ZEND_COMPILE_GUARDS' => %lld,\n", (long long)(ZEND_COMPILE_GUARDS)); +#endif +#ifdef ZEND_COMPILE_NO_BUILTINS + fprintf(constants, " 'ZEND_COMPILE_NO_BUILTINS' => %lld,\n", (long long)(ZEND_COMPILE_NO_BUILTINS)); +#endif +#ifdef ZEND_COMPILE_NO_JUMPTABLES + fprintf(constants, " 'ZEND_COMPILE_NO_JUMPTABLES' => %lld,\n", (long long)(ZEND_COMPILE_NO_JUMPTABLES)); +#endif +#ifdef ZEND_COMPILE_PRELOAD + fprintf(constants, " 'ZEND_COMPILE_PRELOAD' => %lld,\n", (long long)(ZEND_COMPILE_PRELOAD)); +#endif +#ifdef ZEND_COMPILE_PRELOAD_IN_CHILD + fprintf(constants, " 'ZEND_COMPILE_PRELOAD_IN_CHILD' => %lld,\n", (long long)(ZEND_COMPILE_PRELOAD_IN_CHILD)); +#endif +#ifdef ZEND_COMPILE_WITHOUT_EXECUTION + fprintf(constants, " 'ZEND_COMPILE_WITHOUT_EXECUTION' => %lld,\n", (long long)(ZEND_COMPILE_WITHOUT_EXECUTION)); +#endif +#ifdef ZEND_CALL_FUNCTION + fprintf(constants, " 'ZEND_CALL_FUNCTION' => %lld,\n", (long long)(ZEND_CALL_FUNCTION)); +#endif +#ifdef ZEND_CALL_CODE + fprintf(constants, " 'ZEND_CALL_CODE' => %lld,\n", (long long)(ZEND_CALL_CODE)); +#endif +#ifdef ZEND_CALL_NESTED + fprintf(constants, " 'ZEND_CALL_NESTED' => %lld,\n", (long long)(ZEND_CALL_NESTED)); +#endif +#ifdef ZEND_CALL_TOP + fprintf(constants, " 'ZEND_CALL_TOP' => %lld,\n", (long long)(ZEND_CALL_TOP)); +#endif +#ifdef ZEND_CALL_HAS_THIS + fprintf(constants, " 'ZEND_CALL_HAS_THIS' => %lld,\n", (long long)(ZEND_CALL_HAS_THIS)); +#endif +#ifdef ZEND_CALL_FAKE_CLOSURE + fprintf(constants, " 'ZEND_CALL_FAKE_CLOSURE' => %lld,\n", (long long)(ZEND_CALL_FAKE_CLOSURE)); +#endif +#ifdef ZEND_CALL_CLOSURE + fprintf(constants, " 'ZEND_CALL_CLOSURE' => %lld,\n", (long long)(ZEND_CALL_CLOSURE)); +#endif +#ifdef ZEND_CALL_HAS_SYMBOL_TABLE + fprintf(constants, " 'ZEND_CALL_HAS_SYMBOL_TABLE' => %lld,\n", (long long)(ZEND_CALL_HAS_SYMBOL_TABLE)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_CLASS + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_CLASS' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_CLASS)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_FUNCTION + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_FUNCTION' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_FUNCTION)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_METHOD + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_METHOD' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_METHOD)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_PROPERTY + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_PROPERTY' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_PROPERTY)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_CLASS_CONST + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_CLASS_CONST' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_CLASS_CONST)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_PARAMETER + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_PARAMETER' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_PARAMETER)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_CONST + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_CONST' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_CONST)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_ALL + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_ALL' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_ALL)); +#endif +#ifdef ZEND_ATTRIBUTE_IS_REPEATABLE + fprintf(constants, " 'ZEND_ATTRIBUTE_IS_REPEATABLE' => %lld,\n", (long long)(ZEND_ATTRIBUTE_IS_REPEATABLE)); +#endif +#ifdef ZEND_ATTRIBUTE_FLAGS + fprintf(constants, " 'ZEND_ATTRIBUTE_FLAGS' => %lld,\n", (long long)(ZEND_ATTRIBUTE_FLAGS)); +#endif + fprintf(constants, " 'ZEND_AST_ZVAL' => %lld,\n", (long long)(ZEND_AST_ZVAL)); + fprintf(constants, " 'ZEND_AST_CONSTANT' => %lld,\n", (long long)(ZEND_AST_CONSTANT)); + fprintf(constants, " 'ZEND_AST_ZNODE' => %lld,\n", (long long)(ZEND_AST_ZNODE)); + fprintf(constants, " 'ZEND_AST_FUNC_DECL' => %lld,\n", (long long)(ZEND_AST_FUNC_DECL)); + fprintf(constants, " 'ZEND_AST_CLOSURE' => %lld,\n", (long long)(ZEND_AST_CLOSURE)); + fprintf(constants, " 'ZEND_AST_METHOD' => %lld,\n", (long long)(ZEND_AST_METHOD)); + fprintf(constants, " 'ZEND_AST_CLASS' => %lld,\n", (long long)(ZEND_AST_CLASS)); + fprintf(constants, " 'ZEND_AST_ARROW_FUNC' => %lld,\n", (long long)(ZEND_AST_ARROW_FUNC)); + fprintf(constants, " 'ZEND_AST_PROPERTY_HOOK' => %lld,\n", (long long)(ZEND_AST_PROPERTY_HOOK)); + fprintf(constants, " 'ZEND_AST_ARG_LIST' => %lld,\n", (long long)(ZEND_AST_ARG_LIST)); + fprintf(constants, " 'ZEND_AST_ARRAY' => %lld,\n", (long long)(ZEND_AST_ARRAY)); + fprintf(constants, " 'ZEND_AST_ENCAPS_LIST' => %lld,\n", (long long)(ZEND_AST_ENCAPS_LIST)); + fprintf(constants, " 'ZEND_AST_EXPR_LIST' => %lld,\n", (long long)(ZEND_AST_EXPR_LIST)); + fprintf(constants, " 'ZEND_AST_STMT_LIST' => %lld,\n", (long long)(ZEND_AST_STMT_LIST)); + fprintf(constants, " 'ZEND_AST_IF' => %lld,\n", (long long)(ZEND_AST_IF)); + fprintf(constants, " 'ZEND_AST_SWITCH_LIST' => %lld,\n", (long long)(ZEND_AST_SWITCH_LIST)); + fprintf(constants, " 'ZEND_AST_CATCH_LIST' => %lld,\n", (long long)(ZEND_AST_CATCH_LIST)); + fprintf(constants, " 'ZEND_AST_PARAM_LIST' => %lld,\n", (long long)(ZEND_AST_PARAM_LIST)); + fprintf(constants, " 'ZEND_AST_CLOSURE_USES' => %lld,\n", (long long)(ZEND_AST_CLOSURE_USES)); + fprintf(constants, " 'ZEND_AST_PROP_DECL' => %lld,\n", (long long)(ZEND_AST_PROP_DECL)); + fprintf(constants, " 'ZEND_AST_CONST_DECL' => %lld,\n", (long long)(ZEND_AST_CONST_DECL)); + fprintf(constants, " 'ZEND_AST_CLASS_CONST_DECL' => %lld,\n", (long long)(ZEND_AST_CLASS_CONST_DECL)); + fprintf(constants, " 'ZEND_AST_NAME_LIST' => %lld,\n", (long long)(ZEND_AST_NAME_LIST)); + fprintf(constants, " 'ZEND_AST_TRAIT_ADAPTATIONS' => %lld,\n", (long long)(ZEND_AST_TRAIT_ADAPTATIONS)); + fprintf(constants, " 'ZEND_AST_USE' => %lld,\n", (long long)(ZEND_AST_USE)); + fprintf(constants, " 'ZEND_AST_TYPE_UNION' => %lld,\n", (long long)(ZEND_AST_TYPE_UNION)); + fprintf(constants, " 'ZEND_AST_TYPE_INTERSECTION' => %lld,\n", (long long)(ZEND_AST_TYPE_INTERSECTION)); + fprintf(constants, " 'ZEND_AST_ATTRIBUTE_LIST' => %lld,\n", (long long)(ZEND_AST_ATTRIBUTE_LIST)); + fprintf(constants, " 'ZEND_AST_ATTRIBUTE_GROUP' => %lld,\n", (long long)(ZEND_AST_ATTRIBUTE_GROUP)); + fprintf(constants, " 'ZEND_AST_MATCH_ARM_LIST' => %lld,\n", (long long)(ZEND_AST_MATCH_ARM_LIST)); + fprintf(constants, " 'ZEND_AST_MODIFIER_LIST' => %lld,\n", (long long)(ZEND_AST_MODIFIER_LIST)); + fprintf(constants, " 'ZEND_AST_MAGIC_CONST' => %lld,\n", (long long)(ZEND_AST_MAGIC_CONST)); + fprintf(constants, " 'ZEND_AST_TYPE' => %lld,\n", (long long)(ZEND_AST_TYPE)); + fprintf(constants, " 'ZEND_AST_CONSTANT_CLASS' => %lld,\n", (long long)(ZEND_AST_CONSTANT_CLASS)); + fprintf(constants, " 'ZEND_AST_CALLABLE_CONVERT' => %lld,\n", (long long)(ZEND_AST_CALLABLE_CONVERT)); + fprintf(constants, " 'ZEND_AST_VAR' => %lld,\n", (long long)(ZEND_AST_VAR)); + fprintf(constants, " 'ZEND_AST_CONST' => %lld,\n", (long long)(ZEND_AST_CONST)); + fprintf(constants, " 'ZEND_AST_UNPACK' => %lld,\n", (long long)(ZEND_AST_UNPACK)); + fprintf(constants, " 'ZEND_AST_UNARY_PLUS' => %lld,\n", (long long)(ZEND_AST_UNARY_PLUS)); + fprintf(constants, " 'ZEND_AST_UNARY_MINUS' => %lld,\n", (long long)(ZEND_AST_UNARY_MINUS)); + fprintf(constants, " 'ZEND_AST_CAST' => %lld,\n", (long long)(ZEND_AST_CAST)); + fprintf(constants, " 'ZEND_AST_EMPTY' => %lld,\n", (long long)(ZEND_AST_EMPTY)); + fprintf(constants, " 'ZEND_AST_ISSET' => %lld,\n", (long long)(ZEND_AST_ISSET)); + fprintf(constants, " 'ZEND_AST_SILENCE' => %lld,\n", (long long)(ZEND_AST_SILENCE)); + fprintf(constants, " 'ZEND_AST_SHELL_EXEC' => %lld,\n", (long long)(ZEND_AST_SHELL_EXEC)); + fprintf(constants, " 'ZEND_AST_CLONE' => %lld,\n", (long long)(ZEND_AST_CLONE)); + fprintf(constants, " 'ZEND_AST_EXIT' => %lld,\n", (long long)(ZEND_AST_EXIT)); + fprintf(constants, " 'ZEND_AST_PRINT' => %lld,\n", (long long)(ZEND_AST_PRINT)); + fprintf(constants, " 'ZEND_AST_INCLUDE_OR_EVAL' => %lld,\n", (long long)(ZEND_AST_INCLUDE_OR_EVAL)); + fprintf(constants, " 'ZEND_AST_UNARY_OP' => %lld,\n", (long long)(ZEND_AST_UNARY_OP)); + fprintf(constants, " 'ZEND_AST_PRE_INC' => %lld,\n", (long long)(ZEND_AST_PRE_INC)); + fprintf(constants, " 'ZEND_AST_PRE_DEC' => %lld,\n", (long long)(ZEND_AST_PRE_DEC)); + fprintf(constants, " 'ZEND_AST_POST_INC' => %lld,\n", (long long)(ZEND_AST_POST_INC)); + fprintf(constants, " 'ZEND_AST_POST_DEC' => %lld,\n", (long long)(ZEND_AST_POST_DEC)); + fprintf(constants, " 'ZEND_AST_YIELD_FROM' => %lld,\n", (long long)(ZEND_AST_YIELD_FROM)); + fprintf(constants, " 'ZEND_AST_CLASS_NAME' => %lld,\n", (long long)(ZEND_AST_CLASS_NAME)); + fprintf(constants, " 'ZEND_AST_GLOBAL' => %lld,\n", (long long)(ZEND_AST_GLOBAL)); + fprintf(constants, " 'ZEND_AST_UNSET' => %lld,\n", (long long)(ZEND_AST_UNSET)); + fprintf(constants, " 'ZEND_AST_RETURN' => %lld,\n", (long long)(ZEND_AST_RETURN)); + fprintf(constants, " 'ZEND_AST_LABEL' => %lld,\n", (long long)(ZEND_AST_LABEL)); + fprintf(constants, " 'ZEND_AST_REF' => %lld,\n", (long long)(ZEND_AST_REF)); + fprintf(constants, " 'ZEND_AST_HALT_COMPILER' => %lld,\n", (long long)(ZEND_AST_HALT_COMPILER)); + fprintf(constants, " 'ZEND_AST_ECHO' => %lld,\n", (long long)(ZEND_AST_ECHO)); + fprintf(constants, " 'ZEND_AST_THROW' => %lld,\n", (long long)(ZEND_AST_THROW)); + fprintf(constants, " 'ZEND_AST_GOTO' => %lld,\n", (long long)(ZEND_AST_GOTO)); + fprintf(constants, " 'ZEND_AST_BREAK' => %lld,\n", (long long)(ZEND_AST_BREAK)); + fprintf(constants, " 'ZEND_AST_CONTINUE' => %lld,\n", (long long)(ZEND_AST_CONTINUE)); + fprintf(constants, " 'ZEND_AST_PROPERTY_HOOK_SHORT_BODY' => %lld,\n", (long long)(ZEND_AST_PROPERTY_HOOK_SHORT_BODY)); + fprintf(constants, " 'ZEND_AST_DIM' => %lld,\n", (long long)(ZEND_AST_DIM)); + fprintf(constants, " 'ZEND_AST_PROP' => %lld,\n", (long long)(ZEND_AST_PROP)); + fprintf(constants, " 'ZEND_AST_NULLSAFE_PROP' => %lld,\n", (long long)(ZEND_AST_NULLSAFE_PROP)); + fprintf(constants, " 'ZEND_AST_STATIC_PROP' => %lld,\n", (long long)(ZEND_AST_STATIC_PROP)); + fprintf(constants, " 'ZEND_AST_CALL' => %lld,\n", (long long)(ZEND_AST_CALL)); + fprintf(constants, " 'ZEND_AST_CLASS_CONST' => %lld,\n", (long long)(ZEND_AST_CLASS_CONST)); + fprintf(constants, " 'ZEND_AST_ASSIGN' => %lld,\n", (long long)(ZEND_AST_ASSIGN)); + fprintf(constants, " 'ZEND_AST_ASSIGN_REF' => %lld,\n", (long long)(ZEND_AST_ASSIGN_REF)); + fprintf(constants, " 'ZEND_AST_ASSIGN_OP' => %lld,\n", (long long)(ZEND_AST_ASSIGN_OP)); + fprintf(constants, " 'ZEND_AST_BINARY_OP' => %lld,\n", (long long)(ZEND_AST_BINARY_OP)); + fprintf(constants, " 'ZEND_AST_GREATER' => %lld,\n", (long long)(ZEND_AST_GREATER)); + fprintf(constants, " 'ZEND_AST_GREATER_EQUAL' => %lld,\n", (long long)(ZEND_AST_GREATER_EQUAL)); + fprintf(constants, " 'ZEND_AST_AND' => %lld,\n", (long long)(ZEND_AST_AND)); + fprintf(constants, " 'ZEND_AST_OR' => %lld,\n", (long long)(ZEND_AST_OR)); + fprintf(constants, " 'ZEND_AST_ARRAY_ELEM' => %lld,\n", (long long)(ZEND_AST_ARRAY_ELEM)); + fprintf(constants, " 'ZEND_AST_NEW' => %lld,\n", (long long)(ZEND_AST_NEW)); + fprintf(constants, " 'ZEND_AST_INSTANCEOF' => %lld,\n", (long long)(ZEND_AST_INSTANCEOF)); + fprintf(constants, " 'ZEND_AST_YIELD' => %lld,\n", (long long)(ZEND_AST_YIELD)); + fprintf(constants, " 'ZEND_AST_COALESCE' => %lld,\n", (long long)(ZEND_AST_COALESCE)); + fprintf(constants, " 'ZEND_AST_ASSIGN_COALESCE' => %lld,\n", (long long)(ZEND_AST_ASSIGN_COALESCE)); + fprintf(constants, " 'ZEND_AST_STATIC' => %lld,\n", (long long)(ZEND_AST_STATIC)); + fprintf(constants, " 'ZEND_AST_WHILE' => %lld,\n", (long long)(ZEND_AST_WHILE)); + fprintf(constants, " 'ZEND_AST_DO_WHILE' => %lld,\n", (long long)(ZEND_AST_DO_WHILE)); + fprintf(constants, " 'ZEND_AST_IF_ELEM' => %lld,\n", (long long)(ZEND_AST_IF_ELEM)); + fprintf(constants, " 'ZEND_AST_SWITCH' => %lld,\n", (long long)(ZEND_AST_SWITCH)); + fprintf(constants, " 'ZEND_AST_SWITCH_CASE' => %lld,\n", (long long)(ZEND_AST_SWITCH_CASE)); + fprintf(constants, " 'ZEND_AST_DECLARE' => %lld,\n", (long long)(ZEND_AST_DECLARE)); + fprintf(constants, " 'ZEND_AST_USE_TRAIT' => %lld,\n", (long long)(ZEND_AST_USE_TRAIT)); + fprintf(constants, " 'ZEND_AST_TRAIT_PRECEDENCE' => %lld,\n", (long long)(ZEND_AST_TRAIT_PRECEDENCE)); + fprintf(constants, " 'ZEND_AST_METHOD_REFERENCE' => %lld,\n", (long long)(ZEND_AST_METHOD_REFERENCE)); + fprintf(constants, " 'ZEND_AST_NAMESPACE' => %lld,\n", (long long)(ZEND_AST_NAMESPACE)); + fprintf(constants, " 'ZEND_AST_USE_ELEM' => %lld,\n", (long long)(ZEND_AST_USE_ELEM)); + fprintf(constants, " 'ZEND_AST_TRAIT_ALIAS' => %lld,\n", (long long)(ZEND_AST_TRAIT_ALIAS)); + fprintf(constants, " 'ZEND_AST_GROUP_USE' => %lld,\n", (long long)(ZEND_AST_GROUP_USE)); + fprintf(constants, " 'ZEND_AST_ATTRIBUTE' => %lld,\n", (long long)(ZEND_AST_ATTRIBUTE)); + fprintf(constants, " 'ZEND_AST_MATCH' => %lld,\n", (long long)(ZEND_AST_MATCH)); + fprintf(constants, " 'ZEND_AST_MATCH_ARM' => %lld,\n", (long long)(ZEND_AST_MATCH_ARM)); + fprintf(constants, " 'ZEND_AST_NAMED_ARG' => %lld,\n", (long long)(ZEND_AST_NAMED_ARG)); + fprintf(constants, " 'ZEND_AST_PARENT_PROPERTY_HOOK_CALL' => %lld,\n", (long long)(ZEND_AST_PARENT_PROPERTY_HOOK_CALL)); + fprintf(constants, " 'ZEND_AST_METHOD_CALL' => %lld,\n", (long long)(ZEND_AST_METHOD_CALL)); + fprintf(constants, " 'ZEND_AST_NULLSAFE_METHOD_CALL' => %lld,\n", (long long)(ZEND_AST_NULLSAFE_METHOD_CALL)); + fprintf(constants, " 'ZEND_AST_STATIC_CALL' => %lld,\n", (long long)(ZEND_AST_STATIC_CALL)); + fprintf(constants, " 'ZEND_AST_CONDITIONAL' => %lld,\n", (long long)(ZEND_AST_CONDITIONAL)); + fprintf(constants, " 'ZEND_AST_TRY' => %lld,\n", (long long)(ZEND_AST_TRY)); + fprintf(constants, " 'ZEND_AST_CATCH' => %lld,\n", (long long)(ZEND_AST_CATCH)); + fprintf(constants, " 'ZEND_AST_PROP_GROUP' => %lld,\n", (long long)(ZEND_AST_PROP_GROUP)); + fprintf(constants, " 'ZEND_AST_CONST_ELEM' => %lld,\n", (long long)(ZEND_AST_CONST_ELEM)); + fprintf(constants, " 'ZEND_AST_CLASS_CONST_GROUP' => %lld,\n", (long long)(ZEND_AST_CLASS_CONST_GROUP)); + fprintf(constants, " 'ZEND_AST_CONST_ENUM_INIT' => %lld,\n", (long long)(ZEND_AST_CONST_ENUM_INIT)); + fprintf(constants, " 'ZEND_AST_FOR' => %lld,\n", (long long)(ZEND_AST_FOR)); + fprintf(constants, " 'ZEND_AST_FOREACH' => %lld,\n", (long long)(ZEND_AST_FOREACH)); + fprintf(constants, " 'ZEND_AST_ENUM_CASE' => %lld,\n", (long long)(ZEND_AST_ENUM_CASE)); + fprintf(constants, " 'ZEND_AST_PROP_ELEM' => %lld,\n", (long long)(ZEND_AST_PROP_ELEM)); + fprintf(constants, " 'ZEND_AST_PARAM' => %lld,\n", (long long)(ZEND_AST_PARAM)); + fprintf(constants, " 'ZEND_PROPERTY_HOOK_GET' => %lld,\n", (long long)(ZEND_PROPERTY_HOOK_GET)); + fprintf(constants, " 'ZEND_PROPERTY_HOOK_SET' => %lld,\n", (long long)(ZEND_PROPERTY_HOOK_SET)); + fprintf(constants, " 'ZEND_NOP' => 0,\n"); + fprintf(constants, " 'ZEND_ADD' => 1,\n"); + fprintf(constants, " 'ZEND_SUB' => 2,\n"); + fprintf(constants, " 'ZEND_MUL' => 3,\n"); + fprintf(constants, " 'ZEND_DIV' => 4,\n"); + fprintf(constants, " 'ZEND_MOD' => 5,\n"); + fprintf(constants, " 'ZEND_SL' => 6,\n"); + fprintf(constants, " 'ZEND_SR' => 7,\n"); + fprintf(constants, " 'ZEND_CONCAT' => 8,\n"); + fprintf(constants, " 'ZEND_BW_OR' => 9,\n"); + fprintf(constants, " 'ZEND_BW_AND' => 10,\n"); + fprintf(constants, " 'ZEND_BW_XOR' => 11,\n"); + fprintf(constants, " 'ZEND_POW' => 12,\n"); + fprintf(constants, " 'ZEND_BW_NOT' => 13,\n"); + fprintf(constants, " 'ZEND_BOOL_NOT' => 14,\n"); + fprintf(constants, " 'ZEND_BOOL_XOR' => 15,\n"); + fprintf(constants, " 'ZEND_IS_IDENTICAL' => 16,\n"); + fprintf(constants, " 'ZEND_IS_NOT_IDENTICAL' => 17,\n"); + fprintf(constants, " 'ZEND_IS_EQUAL' => 18,\n"); + fprintf(constants, " 'ZEND_IS_NOT_EQUAL' => 19,\n"); + fprintf(constants, " 'ZEND_IS_SMALLER' => 20,\n"); + fprintf(constants, " 'ZEND_IS_SMALLER_OR_EQUAL' => 21,\n"); + fprintf(constants, " 'ZEND_ASSIGN' => 22,\n"); + fprintf(constants, " 'ZEND_ASSIGN_DIM' => 23,\n"); + fprintf(constants, " 'ZEND_ASSIGN_OBJ' => 24,\n"); + fprintf(constants, " 'ZEND_ASSIGN_STATIC_PROP' => 25,\n"); + fprintf(constants, " 'ZEND_ASSIGN_OP' => 26,\n"); + fprintf(constants, " 'ZEND_ASSIGN_DIM_OP' => 27,\n"); + fprintf(constants, " 'ZEND_ASSIGN_OBJ_OP' => 28,\n"); + fprintf(constants, " 'ZEND_ASSIGN_STATIC_PROP_OP' => 29,\n"); + fprintf(constants, " 'ZEND_ASSIGN_REF' => 30,\n"); + fprintf(constants, " 'ZEND_QM_ASSIGN' => 31,\n"); + fprintf(constants, " 'ZEND_ASSIGN_OBJ_REF' => 32,\n"); + fprintf(constants, " 'ZEND_ASSIGN_STATIC_PROP_REF' => 33,\n"); + fprintf(constants, " 'ZEND_PRE_INC' => 34,\n"); + fprintf(constants, " 'ZEND_PRE_DEC' => 35,\n"); + fprintf(constants, " 'ZEND_POST_INC' => 36,\n"); + fprintf(constants, " 'ZEND_POST_DEC' => 37,\n"); + fprintf(constants, " 'ZEND_PRE_INC_STATIC_PROP' => 38,\n"); + fprintf(constants, " 'ZEND_PRE_DEC_STATIC_PROP' => 39,\n"); + fprintf(constants, " 'ZEND_POST_INC_STATIC_PROP' => 40,\n"); + fprintf(constants, " 'ZEND_POST_DEC_STATIC_PROP' => 41,\n"); + fprintf(constants, " 'ZEND_JMP' => 42,\n"); + fprintf(constants, " 'ZEND_JMPZ' => 43,\n"); + fprintf(constants, " 'ZEND_JMPNZ' => 44,\n"); + fprintf(constants, " 'ZEND_JMPZ_EX' => 46,\n"); + fprintf(constants, " 'ZEND_JMPNZ_EX' => 47,\n"); + fprintf(constants, " 'ZEND_CASE' => 48,\n"); + fprintf(constants, " 'ZEND_CHECK_VAR' => 49,\n"); + fprintf(constants, " 'ZEND_SEND_VAR_NO_REF_EX' => 50,\n"); + fprintf(constants, " 'ZEND_CAST' => 51,\n"); + fprintf(constants, " 'ZEND_BOOL' => 52,\n"); + fprintf(constants, " 'ZEND_FAST_CONCAT' => 53,\n"); + fprintf(constants, " 'ZEND_ROPE_INIT' => 54,\n"); + fprintf(constants, " 'ZEND_ROPE_ADD' => 55,\n"); + fprintf(constants, " 'ZEND_ROPE_END' => 56,\n"); + fprintf(constants, " 'ZEND_BEGIN_SILENCE' => 57,\n"); + fprintf(constants, " 'ZEND_END_SILENCE' => 58,\n"); + fprintf(constants, " 'ZEND_INIT_FCALL_BY_NAME' => 59,\n"); + fprintf(constants, " 'ZEND_DO_FCALL' => 60,\n"); + fprintf(constants, " 'ZEND_INIT_FCALL' => 61,\n"); + fprintf(constants, " 'ZEND_RETURN' => 62,\n"); + fprintf(constants, " 'ZEND_RECV' => 63,\n"); + fprintf(constants, " 'ZEND_RECV_INIT' => 64,\n"); + fprintf(constants, " 'ZEND_SEND_VAL' => 65,\n"); + fprintf(constants, " 'ZEND_SEND_VAR_EX' => 66,\n"); + fprintf(constants, " 'ZEND_SEND_REF' => 67,\n"); + fprintf(constants, " 'ZEND_NEW' => 68,\n"); + fprintf(constants, " 'ZEND_INIT_NS_FCALL_BY_NAME' => 69,\n"); + fprintf(constants, " 'ZEND_FREE' => 70,\n"); + fprintf(constants, " 'ZEND_INIT_ARRAY' => 71,\n"); + fprintf(constants, " 'ZEND_ADD_ARRAY_ELEMENT' => 72,\n"); + fprintf(constants, " 'ZEND_INCLUDE_OR_EVAL' => 73,\n"); + fprintf(constants, " 'ZEND_UNSET_VAR' => 74,\n"); + fprintf(constants, " 'ZEND_UNSET_DIM' => 75,\n"); + fprintf(constants, " 'ZEND_UNSET_OBJ' => 76,\n"); + fprintf(constants, " 'ZEND_FE_RESET_R' => 77,\n"); + fprintf(constants, " 'ZEND_FE_FETCH_R' => 78,\n"); + fprintf(constants, " 'ZEND_FETCH_R' => 80,\n"); + fprintf(constants, " 'ZEND_FETCH_DIM_R' => 81,\n"); + fprintf(constants, " 'ZEND_FETCH_OBJ_R' => 82,\n"); + fprintf(constants, " 'ZEND_FETCH_W' => 83,\n"); + fprintf(constants, " 'ZEND_FETCH_DIM_W' => 84,\n"); + fprintf(constants, " 'ZEND_FETCH_OBJ_W' => 85,\n"); + fprintf(constants, " 'ZEND_FETCH_RW' => 86,\n"); + fprintf(constants, " 'ZEND_FETCH_DIM_RW' => 87,\n"); + fprintf(constants, " 'ZEND_FETCH_OBJ_RW' => 88,\n"); + fprintf(constants, " 'ZEND_FETCH_IS' => 89,\n"); + fprintf(constants, " 'ZEND_FETCH_DIM_IS' => 90,\n"); + fprintf(constants, " 'ZEND_FETCH_OBJ_IS' => 91,\n"); + fprintf(constants, " 'ZEND_FETCH_FUNC_ARG' => 92,\n"); + fprintf(constants, " 'ZEND_FETCH_DIM_FUNC_ARG' => 93,\n"); + fprintf(constants, " 'ZEND_FETCH_OBJ_FUNC_ARG' => 94,\n"); + fprintf(constants, " 'ZEND_FETCH_UNSET' => 95,\n"); + fprintf(constants, " 'ZEND_FETCH_DIM_UNSET' => 96,\n"); + fprintf(constants, " 'ZEND_FETCH_OBJ_UNSET' => 97,\n"); + fprintf(constants, " 'ZEND_FETCH_LIST_R' => 98,\n"); + fprintf(constants, " 'ZEND_FETCH_CONSTANT' => 99,\n"); + fprintf(constants, " 'ZEND_CHECK_FUNC_ARG' => 100,\n"); + fprintf(constants, " 'ZEND_EXT_STMT' => 101,\n"); + fprintf(constants, " 'ZEND_EXT_FCALL_BEGIN' => 102,\n"); + fprintf(constants, " 'ZEND_EXT_FCALL_END' => 103,\n"); + fprintf(constants, " 'ZEND_EXT_NOP' => 104,\n"); + fprintf(constants, " 'ZEND_TICKS' => 105,\n"); + fprintf(constants, " 'ZEND_SEND_VAR_NO_REF' => 106,\n"); + fprintf(constants, " 'ZEND_CATCH' => 107,\n"); + fprintf(constants, " 'ZEND_THROW' => 108,\n"); + fprintf(constants, " 'ZEND_FETCH_CLASS' => 109,\n"); + fprintf(constants, " 'ZEND_CLONE' => 110,\n"); + fprintf(constants, " 'ZEND_RETURN_BY_REF' => 111,\n"); + fprintf(constants, " 'ZEND_INIT_METHOD_CALL' => 112,\n"); + fprintf(constants, " 'ZEND_INIT_STATIC_METHOD_CALL' => 113,\n"); + fprintf(constants, " 'ZEND_ISSET_ISEMPTY_VAR' => 114,\n"); + fprintf(constants, " 'ZEND_ISSET_ISEMPTY_DIM_OBJ' => 115,\n"); + fprintf(constants, " 'ZEND_SEND_VAL_EX' => 116,\n"); + fprintf(constants, " 'ZEND_SEND_VAR' => 117,\n"); + fprintf(constants, " 'ZEND_INIT_USER_CALL' => 118,\n"); + fprintf(constants, " 'ZEND_SEND_ARRAY' => 119,\n"); + fprintf(constants, " 'ZEND_SEND_USER' => 120,\n"); + fprintf(constants, " 'ZEND_STRLEN' => 121,\n"); + fprintf(constants, " 'ZEND_DEFINED' => 122,\n"); + fprintf(constants, " 'ZEND_TYPE_CHECK' => 123,\n"); + fprintf(constants, " 'ZEND_VERIFY_RETURN_TYPE' => 124,\n"); + fprintf(constants, " 'ZEND_FE_RESET_RW' => 125,\n"); + fprintf(constants, " 'ZEND_FE_FETCH_RW' => 126,\n"); + fprintf(constants, " 'ZEND_FE_FREE' => 127,\n"); + fprintf(constants, " 'ZEND_INIT_DYNAMIC_CALL' => 128,\n"); + fprintf(constants, " 'ZEND_DO_ICALL' => 129,\n"); + fprintf(constants, " 'ZEND_DO_UCALL' => 130,\n"); + fprintf(constants, " 'ZEND_DO_FCALL_BY_NAME' => 131,\n"); + fprintf(constants, " 'ZEND_PRE_INC_OBJ' => 132,\n"); + fprintf(constants, " 'ZEND_PRE_DEC_OBJ' => 133,\n"); + fprintf(constants, " 'ZEND_POST_INC_OBJ' => 134,\n"); + fprintf(constants, " 'ZEND_POST_DEC_OBJ' => 135,\n"); + fprintf(constants, " 'ZEND_ECHO' => 136,\n"); + fprintf(constants, " 'ZEND_OP_DATA' => 137,\n"); + fprintf(constants, " 'ZEND_INSTANCEOF' => 138,\n"); + fprintf(constants, " 'ZEND_GENERATOR_CREATE' => 139,\n"); + fprintf(constants, " 'ZEND_MAKE_REF' => 140,\n"); + fprintf(constants, " 'ZEND_DECLARE_FUNCTION' => 141,\n"); + fprintf(constants, " 'ZEND_DECLARE_LAMBDA_FUNCTION' => 142,\n"); + fprintf(constants, " 'ZEND_DECLARE_CONST' => 143,\n"); + fprintf(constants, " 'ZEND_DECLARE_CLASS' => 144,\n"); + fprintf(constants, " 'ZEND_DECLARE_CLASS_DELAYED' => 145,\n"); + fprintf(constants, " 'ZEND_DECLARE_ANON_CLASS' => 146,\n"); + fprintf(constants, " 'ZEND_ADD_ARRAY_UNPACK' => 147,\n"); + fprintf(constants, " 'ZEND_ISSET_ISEMPTY_PROP_OBJ' => 148,\n"); + fprintf(constants, " 'ZEND_HANDLE_EXCEPTION' => 149,\n"); + fprintf(constants, " 'ZEND_USER_OPCODE' => 150,\n"); + fprintf(constants, " 'ZEND_ASSERT_CHECK' => 151,\n"); + fprintf(constants, " 'ZEND_JMP_SET' => 152,\n"); + fprintf(constants, " 'ZEND_UNSET_CV' => 153,\n"); + fprintf(constants, " 'ZEND_ISSET_ISEMPTY_CV' => 154,\n"); + fprintf(constants, " 'ZEND_FETCH_LIST_W' => 155,\n"); + fprintf(constants, " 'ZEND_SEPARATE' => 156,\n"); + fprintf(constants, " 'ZEND_FETCH_CLASS_NAME' => 157,\n"); + fprintf(constants, " 'ZEND_CALL_TRAMPOLINE' => 158,\n"); + fprintf(constants, " 'ZEND_DISCARD_EXCEPTION' => 159,\n"); + fprintf(constants, " 'ZEND_YIELD' => 160,\n"); + fprintf(constants, " 'ZEND_GENERATOR_RETURN' => 161,\n"); + fprintf(constants, " 'ZEND_FAST_CALL' => 162,\n"); + fprintf(constants, " 'ZEND_FAST_RET' => 163,\n"); + fprintf(constants, " 'ZEND_RECV_VARIADIC' => 164,\n"); + fprintf(constants, " 'ZEND_SEND_UNPACK' => 165,\n"); + fprintf(constants, " 'ZEND_YIELD_FROM' => 166,\n"); + fprintf(constants, " 'ZEND_COPY_TMP' => 167,\n"); + fprintf(constants, " 'ZEND_BIND_GLOBAL' => 168,\n"); + fprintf(constants, " 'ZEND_COALESCE' => 169,\n"); + fprintf(constants, " 'ZEND_SPACESHIP' => 170,\n"); + fprintf(constants, " 'ZEND_FUNC_NUM_ARGS' => 171,\n"); + fprintf(constants, " 'ZEND_FUNC_GET_ARGS' => 172,\n"); + fprintf(constants, " 'ZEND_FETCH_STATIC_PROP_R' => 173,\n"); + fprintf(constants, " 'ZEND_FETCH_STATIC_PROP_W' => 174,\n"); + fprintf(constants, " 'ZEND_FETCH_STATIC_PROP_RW' => 175,\n"); + fprintf(constants, " 'ZEND_FETCH_STATIC_PROP_IS' => 176,\n"); + fprintf(constants, " 'ZEND_FETCH_STATIC_PROP_FUNC_ARG' => 177,\n"); + fprintf(constants, " 'ZEND_FETCH_STATIC_PROP_UNSET' => 178,\n"); + fprintf(constants, " 'ZEND_UNSET_STATIC_PROP' => 179,\n"); + fprintf(constants, " 'ZEND_ISSET_ISEMPTY_STATIC_PROP' => 180,\n"); + fprintf(constants, " 'ZEND_FETCH_CLASS_CONSTANT' => 181,\n"); + fprintf(constants, " 'ZEND_BIND_LEXICAL' => 182,\n"); + fprintf(constants, " 'ZEND_BIND_STATIC' => 183,\n"); + fprintf(constants, " 'ZEND_FETCH_THIS' => 184,\n"); + fprintf(constants, " 'ZEND_SEND_FUNC_ARG' => 185,\n"); + fprintf(constants, " 'ZEND_ISSET_ISEMPTY_THIS' => 186,\n"); + fprintf(constants, " 'ZEND_SWITCH_LONG' => 187,\n"); + fprintf(constants, " 'ZEND_SWITCH_STRING' => 188,\n"); + fprintf(constants, " 'ZEND_IN_ARRAY' => 189,\n"); + fprintf(constants, " 'ZEND_COUNT' => 190,\n"); + fprintf(constants, " 'ZEND_GET_CLASS' => 191,\n"); + fprintf(constants, " 'ZEND_GET_CALLED_CLASS' => 192,\n"); + fprintf(constants, " 'ZEND_GET_TYPE' => 193,\n"); + fprintf(constants, " 'ZEND_ARRAY_KEY_EXISTS' => 194,\n"); + fprintf(constants, " 'ZEND_MATCH' => 195,\n"); + fprintf(constants, " 'ZEND_CASE_STRICT' => 196,\n"); + fprintf(constants, " 'ZEND_MATCH_ERROR' => 197,\n"); + fprintf(constants, " 'ZEND_JMP_NULL' => 198,\n"); + fprintf(constants, " 'ZEND_CHECK_UNDEF_ARGS' => 199,\n"); + fprintf(constants, " 'ZEND_FETCH_GLOBALS' => 200,\n"); + fprintf(constants, " 'ZEND_VERIFY_NEVER_TYPE' => 201,\n"); + fprintf(constants, " 'ZEND_CALLABLE_CONVERT' => 202,\n"); + fprintf(constants, " 'ZEND_BIND_INIT_STATIC_OR_JMP' => 203,\n"); + fprintf(constants, " 'ZEND_FRAMELESS_ICALL_0' => 204,\n"); + fprintf(constants, " 'ZEND_FRAMELESS_ICALL_1' => 205,\n"); + fprintf(constants, " 'ZEND_FRAMELESS_ICALL_2' => 206,\n"); + fprintf(constants, " 'ZEND_FRAMELESS_ICALL_3' => 207,\n"); + fprintf(constants, " 'ZEND_JMP_FRAMELESS' => 208,\n"); + fprintf(constants, " 'ZEND_INIT_PARENT_PROPERTY_HOOK_CALL' => 209,\n"); + fprintf(constants, " 'ZEND_VM_LAST_OPCODE' => 209,\n"); + fputs("];\n", constants); + fclose(constants); + + fputs("{\n", layouts); + fprintf(layouts, " \"meta\": {\"php\": \"%d.%d\", \"api\": %d, \"zts\": %d, \"debug\": %d},\n", PHP_MAJOR_VERSION, PHP_MINOR_VERSION, ZEND_MODULE_API_NO, (int)USING_ZTS, (int)ZEND_DEBUG); + fputs(" \"structs\": {\n", layouts); + fputs(" \"zval\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zval)); + fprintf(layouts, "\"value\": %zu", offsetof(zval, value)); + fprintf(layouts, ", \"u1\": %zu", offsetof(zval, u1)); + fprintf(layouts, ", \"u2\": %zu", offsetof(zval, u2)); + fputs("}},\n", layouts); + fputs(" \"zend_refcounted\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_refcounted)); + fprintf(layouts, "\"gc\": %zu", offsetof(zend_refcounted, gc)); + fputs("}},\n", layouts); + fputs(" \"zend_string\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_string)); + fprintf(layouts, "\"gc\": %zu", offsetof(zend_string, gc)); + fprintf(layouts, ", \"h\": %zu", offsetof(zend_string, h)); + fprintf(layouts, ", \"len\": %zu", offsetof(zend_string, len)); + fprintf(layouts, ", \"val\": %zu", offsetof(zend_string, val)); + fputs("}},\n", layouts); + fputs(" \"zend_array\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_array)); + fprintf(layouts, "\"gc\": %zu", offsetof(zend_array, gc)); + fprintf(layouts, ", \"u\": %zu", offsetof(zend_array, u)); + fprintf(layouts, ", \"nTableMask\": %zu", offsetof(zend_array, nTableMask)); + fprintf(layouts, ", \"arHash\": %zu", offsetof(zend_array, arHash)); + fprintf(layouts, ", \"arData\": %zu", offsetof(zend_array, arData)); + fprintf(layouts, ", \"arPacked\": %zu", offsetof(zend_array, arPacked)); + fprintf(layouts, ", \"nNumUsed\": %zu", offsetof(zend_array, nNumUsed)); + fprintf(layouts, ", \"nNumOfElements\": %zu", offsetof(zend_array, nNumOfElements)); + fprintf(layouts, ", \"nTableSize\": %zu", offsetof(zend_array, nTableSize)); + fprintf(layouts, ", \"nInternalPointer\": %zu", offsetof(zend_array, nInternalPointer)); + fprintf(layouts, ", \"nNextFreeElement\": %zu", offsetof(zend_array, nNextFreeElement)); + fprintf(layouts, ", \"pDestructor\": %zu", offsetof(zend_array, pDestructor)); + fputs("}},\n", layouts); + fputs(" \"Bucket\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(Bucket)); + fprintf(layouts, "\"val\": %zu", offsetof(Bucket, val)); + fprintf(layouts, ", \"h\": %zu", offsetof(Bucket, h)); + fprintf(layouts, ", \"key\": %zu", offsetof(Bucket, key)); + fputs("}},\n", layouts); + fputs(" \"zend_object\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_object)); + fprintf(layouts, "\"gc\": %zu", offsetof(zend_object, gc)); + fprintf(layouts, ", \"handle\": %zu", offsetof(zend_object, handle)); + fprintf(layouts, ", \"extra_flags\": %zu", offsetof(zend_object, extra_flags)); + fprintf(layouts, ", \"ce\": %zu", offsetof(zend_object, ce)); + fprintf(layouts, ", \"handlers\": %zu", offsetof(zend_object, handlers)); + fprintf(layouts, ", \"properties\": %zu", offsetof(zend_object, properties)); + fprintf(layouts, ", \"properties_table\": %zu", offsetof(zend_object, properties_table)); + fputs("}},\n", layouts); + fputs(" \"zend_resource\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_resource)); + fprintf(layouts, "\"gc\": %zu", offsetof(zend_resource, gc)); + fprintf(layouts, ", \"handle\": %zu", offsetof(zend_resource, handle)); + fprintf(layouts, ", \"type\": %zu", offsetof(zend_resource, type)); + fprintf(layouts, ", \"ptr\": %zu", offsetof(zend_resource, ptr)); + fputs("}},\n", layouts); + fputs(" \"zend_reference\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_reference)); + fprintf(layouts, "\"gc\": %zu", offsetof(zend_reference, gc)); + fprintf(layouts, ", \"val\": %zu", offsetof(zend_reference, val)); + fprintf(layouts, ", \"sources\": %zu", offsetof(zend_reference, sources)); + fputs("}},\n", layouts); + fputs(" \"zend_class_entry\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_class_entry)); + fprintf(layouts, "\"type\": %zu", offsetof(zend_class_entry, type)); + fprintf(layouts, ", \"name\": %zu", offsetof(zend_class_entry, name)); + fprintf(layouts, ", \"parent\": %zu", offsetof(zend_class_entry, parent)); + fprintf(layouts, ", \"parent_name\": %zu", offsetof(zend_class_entry, parent_name)); + fprintf(layouts, ", \"refcount\": %zu", offsetof(zend_class_entry, refcount)); + fprintf(layouts, ", \"ce_flags\": %zu", offsetof(zend_class_entry, ce_flags)); + fprintf(layouts, ", \"default_properties_count\": %zu", offsetof(zend_class_entry, default_properties_count)); + fprintf(layouts, ", \"default_static_members_count\": %zu", offsetof(zend_class_entry, default_static_members_count)); + fprintf(layouts, ", \"default_properties_table\": %zu", offsetof(zend_class_entry, default_properties_table)); + fprintf(layouts, ", \"default_static_members_table\": %zu", offsetof(zend_class_entry, default_static_members_table)); + fprintf(layouts, ", \"static_members_table__ptr\": %zu", offsetof(zend_class_entry, static_members_table__ptr)); + fprintf(layouts, ", \"function_table\": %zu", offsetof(zend_class_entry, function_table)); + fprintf(layouts, ", \"properties_info\": %zu", offsetof(zend_class_entry, properties_info)); + fprintf(layouts, ", \"constants_table\": %zu", offsetof(zend_class_entry, constants_table)); + fprintf(layouts, ", \"mutable_data__ptr\": %zu", offsetof(zend_class_entry, mutable_data__ptr)); + fprintf(layouts, ", \"inheritance_cache\": %zu", offsetof(zend_class_entry, inheritance_cache)); + fprintf(layouts, ", \"properties_info_table\": %zu", offsetof(zend_class_entry, properties_info_table)); + fprintf(layouts, ", \"constructor\": %zu", offsetof(zend_class_entry, constructor)); + fprintf(layouts, ", \"destructor\": %zu", offsetof(zend_class_entry, destructor)); + fprintf(layouts, ", \"clone\": %zu", offsetof(zend_class_entry, clone)); + fprintf(layouts, ", \"__get\": %zu", offsetof(zend_class_entry, __get)); + fprintf(layouts, ", \"__set\": %zu", offsetof(zend_class_entry, __set)); + fprintf(layouts, ", \"__unset\": %zu", offsetof(zend_class_entry, __unset)); + fprintf(layouts, ", \"__isset\": %zu", offsetof(zend_class_entry, __isset)); + fprintf(layouts, ", \"__call\": %zu", offsetof(zend_class_entry, __call)); + fprintf(layouts, ", \"__callstatic\": %zu", offsetof(zend_class_entry, __callstatic)); + fprintf(layouts, ", \"__tostring\": %zu", offsetof(zend_class_entry, __tostring)); + fprintf(layouts, ", \"__debugInfo\": %zu", offsetof(zend_class_entry, __debugInfo)); + fprintf(layouts, ", \"__serialize\": %zu", offsetof(zend_class_entry, __serialize)); + fprintf(layouts, ", \"__unserialize\": %zu", offsetof(zend_class_entry, __unserialize)); + fprintf(layouts, ", \"default_object_handlers\": %zu", offsetof(zend_class_entry, default_object_handlers)); + fprintf(layouts, ", \"iterator_funcs_ptr\": %zu", offsetof(zend_class_entry, iterator_funcs_ptr)); + fprintf(layouts, ", \"arrayaccess_funcs_ptr\": %zu", offsetof(zend_class_entry, arrayaccess_funcs_ptr)); + fprintf(layouts, ", \"create_object\": %zu", offsetof(zend_class_entry, create_object)); + fprintf(layouts, ", \"interface_gets_implemented\": %zu", offsetof(zend_class_entry, interface_gets_implemented)); + fprintf(layouts, ", \"get_iterator\": %zu", offsetof(zend_class_entry, get_iterator)); + fprintf(layouts, ", \"get_static_method\": %zu", offsetof(zend_class_entry, get_static_method)); + fprintf(layouts, ", \"serialize\": %zu", offsetof(zend_class_entry, serialize)); + fprintf(layouts, ", \"unserialize\": %zu", offsetof(zend_class_entry, unserialize)); + fprintf(layouts, ", \"num_interfaces\": %zu", offsetof(zend_class_entry, num_interfaces)); + fprintf(layouts, ", \"num_traits\": %zu", offsetof(zend_class_entry, num_traits)); + fprintf(layouts, ", \"num_hooked_props\": %zu", offsetof(zend_class_entry, num_hooked_props)); + fprintf(layouts, ", \"num_hooked_prop_variance_checks\": %zu", offsetof(zend_class_entry, num_hooked_prop_variance_checks)); + fprintf(layouts, ", \"interfaces\": %zu", offsetof(zend_class_entry, interfaces)); + fprintf(layouts, ", \"interface_names\": %zu", offsetof(zend_class_entry, interface_names)); + fprintf(layouts, ", \"trait_names\": %zu", offsetof(zend_class_entry, trait_names)); + fprintf(layouts, ", \"trait_aliases\": %zu", offsetof(zend_class_entry, trait_aliases)); + fprintf(layouts, ", \"trait_precedences\": %zu", offsetof(zend_class_entry, trait_precedences)); + fprintf(layouts, ", \"attributes\": %zu", offsetof(zend_class_entry, attributes)); + fprintf(layouts, ", \"enum_backing_type\": %zu", offsetof(zend_class_entry, enum_backing_type)); + fprintf(layouts, ", \"backed_enum_table\": %zu", offsetof(zend_class_entry, backed_enum_table)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_class_entry, doc_comment)); + fprintf(layouts, ", \"info\": %zu", offsetof(zend_class_entry, info)); + fputs("}},\n", layouts); + fputs(" \"zend_class_constant\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_class_constant)); + fprintf(layouts, "\"value\": %zu", offsetof(zend_class_constant, value)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_class_constant, doc_comment)); + fprintf(layouts, ", \"attributes\": %zu", offsetof(zend_class_constant, attributes)); + fprintf(layouts, ", \"ce\": %zu", offsetof(zend_class_constant, ce)); + fprintf(layouts, ", \"type\": %zu", offsetof(zend_class_constant, type)); + fputs("}},\n", layouts); + fputs(" \"zend_class_name\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_class_name)); + fprintf(layouts, "\"name\": %zu", offsetof(zend_class_name, name)); + fprintf(layouts, ", \"lc_name\": %zu", offsetof(zend_class_name, lc_name)); + fputs("}},\n", layouts); + fputs(" \"zend_property_info\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_property_info)); + fprintf(layouts, "\"offset\": %zu", offsetof(zend_property_info, offset)); + fprintf(layouts, ", \"flags\": %zu", offsetof(zend_property_info, flags)); + fprintf(layouts, ", \"name\": %zu", offsetof(zend_property_info, name)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_property_info, doc_comment)); + fprintf(layouts, ", \"attributes\": %zu", offsetof(zend_property_info, attributes)); + fprintf(layouts, ", \"ce\": %zu", offsetof(zend_property_info, ce)); + fprintf(layouts, ", \"type\": %zu", offsetof(zend_property_info, type)); + fprintf(layouts, ", \"prototype\": %zu", offsetof(zend_property_info, prototype)); + fprintf(layouts, ", \"hooks\": %zu", offsetof(zend_property_info, hooks)); + fputs("}},\n", layouts); + fputs(" \"zend_type_list\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_type_list)); + fprintf(layouts, "\"num_types\": %zu", offsetof(zend_type_list, num_types)); + fprintf(layouts, ", \"types\": %zu", offsetof(zend_type_list, types)); + fputs("}},\n", layouts); + fputs(" \"zend_constant\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_constant)); + fprintf(layouts, "\"value\": %zu", offsetof(zend_constant, value)); + fprintf(layouts, ", \"name\": %zu", offsetof(zend_constant, name)); + fputs("}},\n", layouts); + fputs(" \"zend_attribute\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_attribute)); + fprintf(layouts, "\"name\": %zu", offsetof(zend_attribute, name)); + fprintf(layouts, ", \"lcname\": %zu", offsetof(zend_attribute, lcname)); + fprintf(layouts, ", \"flags\": %zu", offsetof(zend_attribute, flags)); + fprintf(layouts, ", \"lineno\": %zu", offsetof(zend_attribute, lineno)); + fprintf(layouts, ", \"offset\": %zu", offsetof(zend_attribute, offset)); + fprintf(layouts, ", \"argc\": %zu", offsetof(zend_attribute, argc)); + fprintf(layouts, ", \"args\": %zu", offsetof(zend_attribute, args)); + fputs("}},\n", layouts); + fputs(" \"zend_attribute_arg\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_attribute_arg)); + fprintf(layouts, "\"name\": %zu", offsetof(zend_attribute_arg, name)); + fprintf(layouts, ", \"value\": %zu", offsetof(zend_attribute_arg, value)); + fputs("}},\n", layouts); + fputs(" \"zend_op_array\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_op_array)); + fprintf(layouts, "\"type\": %zu", offsetof(zend_op_array, type)); + fprintf(layouts, ", \"arg_flags\": %zu", offsetof(zend_op_array, arg_flags)); + fprintf(layouts, ", \"fn_flags\": %zu", offsetof(zend_op_array, fn_flags)); + fprintf(layouts, ", \"function_name\": %zu", offsetof(zend_op_array, function_name)); + fprintf(layouts, ", \"scope\": %zu", offsetof(zend_op_array, scope)); + fprintf(layouts, ", \"prototype\": %zu", offsetof(zend_op_array, prototype)); + fprintf(layouts, ", \"num_args\": %zu", offsetof(zend_op_array, num_args)); + fprintf(layouts, ", \"required_num_args\": %zu", offsetof(zend_op_array, required_num_args)); + fprintf(layouts, ", \"arg_info\": %zu", offsetof(zend_op_array, arg_info)); + fprintf(layouts, ", \"attributes\": %zu", offsetof(zend_op_array, attributes)); + fprintf(layouts, ", \"run_time_cache__ptr\": %zu", offsetof(zend_op_array, run_time_cache__ptr)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_op_array, doc_comment)); + fprintf(layouts, ", \"T\": %zu", offsetof(zend_op_array, T)); + fprintf(layouts, ", \"prop_info\": %zu", offsetof(zend_op_array, prop_info)); + fprintf(layouts, ", \"cache_size\": %zu", offsetof(zend_op_array, cache_size)); + fprintf(layouts, ", \"last_var\": %zu", offsetof(zend_op_array, last_var)); + fprintf(layouts, ", \"last\": %zu", offsetof(zend_op_array, last)); + fprintf(layouts, ", \"opcodes\": %zu", offsetof(zend_op_array, opcodes)); + fprintf(layouts, ", \"static_variables_ptr__ptr\": %zu", offsetof(zend_op_array, static_variables_ptr__ptr)); + fprintf(layouts, ", \"static_variables\": %zu", offsetof(zend_op_array, static_variables)); + fprintf(layouts, ", \"vars\": %zu", offsetof(zend_op_array, vars)); + fprintf(layouts, ", \"refcount\": %zu", offsetof(zend_op_array, refcount)); + fprintf(layouts, ", \"last_live_range\": %zu", offsetof(zend_op_array, last_live_range)); + fprintf(layouts, ", \"last_try_catch\": %zu", offsetof(zend_op_array, last_try_catch)); + fprintf(layouts, ", \"live_range\": %zu", offsetof(zend_op_array, live_range)); + fprintf(layouts, ", \"try_catch_array\": %zu", offsetof(zend_op_array, try_catch_array)); + fprintf(layouts, ", \"filename\": %zu", offsetof(zend_op_array, filename)); + fprintf(layouts, ", \"line_start\": %zu", offsetof(zend_op_array, line_start)); + fprintf(layouts, ", \"line_end\": %zu", offsetof(zend_op_array, line_end)); + fprintf(layouts, ", \"last_literal\": %zu", offsetof(zend_op_array, last_literal)); + fprintf(layouts, ", \"num_dynamic_func_defs\": %zu", offsetof(zend_op_array, num_dynamic_func_defs)); + fprintf(layouts, ", \"literals\": %zu", offsetof(zend_op_array, literals)); + fprintf(layouts, ", \"dynamic_func_defs\": %zu", offsetof(zend_op_array, dynamic_func_defs)); + fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_op_array, reserved)); + fputs("}},\n", layouts); + fputs(" \"zend_internal_function\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_internal_function)); + fprintf(layouts, "\"type\": %zu", offsetof(zend_internal_function, type)); + fprintf(layouts, ", \"arg_flags\": %zu", offsetof(zend_internal_function, arg_flags)); + fprintf(layouts, ", \"fn_flags\": %zu", offsetof(zend_internal_function, fn_flags)); + fprintf(layouts, ", \"function_name\": %zu", offsetof(zend_internal_function, function_name)); + fprintf(layouts, ", \"scope\": %zu", offsetof(zend_internal_function, scope)); + fprintf(layouts, ", \"prototype\": %zu", offsetof(zend_internal_function, prototype)); + fprintf(layouts, ", \"num_args\": %zu", offsetof(zend_internal_function, num_args)); + fprintf(layouts, ", \"required_num_args\": %zu", offsetof(zend_internal_function, required_num_args)); + fprintf(layouts, ", \"arg_info\": %zu", offsetof(zend_internal_function, arg_info)); + fprintf(layouts, ", \"attributes\": %zu", offsetof(zend_internal_function, attributes)); + fprintf(layouts, ", \"run_time_cache__ptr\": %zu", offsetof(zend_internal_function, run_time_cache__ptr)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_internal_function, doc_comment)); + fprintf(layouts, ", \"T\": %zu", offsetof(zend_internal_function, T)); + fprintf(layouts, ", \"prop_info\": %zu", offsetof(zend_internal_function, prop_info)); + fprintf(layouts, ", \"handler\": %zu", offsetof(zend_internal_function, handler)); + fprintf(layouts, ", \"module\": %zu", offsetof(zend_internal_function, module)); + fprintf(layouts, ", \"frameless_function_infos\": %zu", offsetof(zend_internal_function, frameless_function_infos)); + fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_internal_function, reserved)); + fputs("}},\n", layouts); + fputs(" \"zend_op\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_op)); + fprintf(layouts, "\"handler\": %zu", offsetof(zend_op, handler)); + fprintf(layouts, ", \"op1\": %zu", offsetof(zend_op, op1)); + fprintf(layouts, ", \"op2\": %zu", offsetof(zend_op, op2)); + fprintf(layouts, ", \"result\": %zu", offsetof(zend_op, result)); + fprintf(layouts, ", \"extended_value\": %zu", offsetof(zend_op, extended_value)); + fprintf(layouts, ", \"lineno\": %zu", offsetof(zend_op, lineno)); + fprintf(layouts, ", \"opcode\": %zu", offsetof(zend_op, opcode)); + fprintf(layouts, ", \"op1_type\": %zu", offsetof(zend_op, op1_type)); + fprintf(layouts, ", \"op2_type\": %zu", offsetof(zend_op, op2_type)); + fprintf(layouts, ", \"result_type\": %zu", offsetof(zend_op, result_type)); + fputs("}},\n", layouts); + fputs(" \"zend_execute_data\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_execute_data)); + fprintf(layouts, "\"opline\": %zu", offsetof(zend_execute_data, opline)); + fprintf(layouts, ", \"call\": %zu", offsetof(zend_execute_data, call)); + fprintf(layouts, ", \"return_value\": %zu", offsetof(zend_execute_data, return_value)); + fprintf(layouts, ", \"func\": %zu", offsetof(zend_execute_data, func)); + fprintf(layouts, ", \"This\": %zu", offsetof(zend_execute_data, This)); + fprintf(layouts, ", \"prev_execute_data\": %zu", offsetof(zend_execute_data, prev_execute_data)); + fprintf(layouts, ", \"symbol_table\": %zu", offsetof(zend_execute_data, symbol_table)); + fprintf(layouts, ", \"run_time_cache\": %zu", offsetof(zend_execute_data, run_time_cache)); + fprintf(layouts, ", \"extra_named_params\": %zu", offsetof(zend_execute_data, extra_named_params)); + fputs("}},\n", layouts); + fputs(" \"zend_objects_store\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_objects_store)); + fprintf(layouts, "\"object_buckets\": %zu", offsetof(zend_objects_store, object_buckets)); + fprintf(layouts, ", \"top\": %zu", offsetof(zend_objects_store, top)); + fprintf(layouts, ", \"size\": %zu", offsetof(zend_objects_store, size)); + fprintf(layouts, ", \"free_list_head\": %zu", offsetof(zend_objects_store, free_list_head)); + fputs("}},\n", layouts); + fputs(" \"zend_executor_globals\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_executor_globals)); + fprintf(layouts, "\"uninitialized_zval\": %zu", offsetof(zend_executor_globals, uninitialized_zval)); + fprintf(layouts, ", \"error_zval\": %zu", offsetof(zend_executor_globals, error_zval)); + fprintf(layouts, ", \"symtable_cache\": %zu", offsetof(zend_executor_globals, symtable_cache)); + fprintf(layouts, ", \"symtable_cache_limit\": %zu", offsetof(zend_executor_globals, symtable_cache_limit)); + fprintf(layouts, ", \"symtable_cache_ptr\": %zu", offsetof(zend_executor_globals, symtable_cache_ptr)); + fprintf(layouts, ", \"symbol_table\": %zu", offsetof(zend_executor_globals, symbol_table)); + fprintf(layouts, ", \"included_files\": %zu", offsetof(zend_executor_globals, included_files)); + fprintf(layouts, ", \"bailout\": %zu", offsetof(zend_executor_globals, bailout)); + fprintf(layouts, ", \"error_reporting\": %zu", offsetof(zend_executor_globals, error_reporting)); + fprintf(layouts, ", \"exit_status\": %zu", offsetof(zend_executor_globals, exit_status)); + fprintf(layouts, ", \"function_table\": %zu", offsetof(zend_executor_globals, function_table)); + fprintf(layouts, ", \"class_table\": %zu", offsetof(zend_executor_globals, class_table)); + fprintf(layouts, ", \"zend_constants\": %zu", offsetof(zend_executor_globals, zend_constants)); + fprintf(layouts, ", \"vm_stack_top\": %zu", offsetof(zend_executor_globals, vm_stack_top)); + fprintf(layouts, ", \"vm_stack_end\": %zu", offsetof(zend_executor_globals, vm_stack_end)); + fprintf(layouts, ", \"vm_stack\": %zu", offsetof(zend_executor_globals, vm_stack)); + fprintf(layouts, ", \"vm_stack_page_size\": %zu", offsetof(zend_executor_globals, vm_stack_page_size)); + fprintf(layouts, ", \"current_execute_data\": %zu", offsetof(zend_executor_globals, current_execute_data)); + fprintf(layouts, ", \"fake_scope\": %zu", offsetof(zend_executor_globals, fake_scope)); + fprintf(layouts, ", \"jit_trace_num\": %zu", offsetof(zend_executor_globals, jit_trace_num)); + fprintf(layouts, ", \"current_observed_frame\": %zu", offsetof(zend_executor_globals, current_observed_frame)); + fprintf(layouts, ", \"ticks_count\": %zu", offsetof(zend_executor_globals, ticks_count)); + fprintf(layouts, ", \"precision\": %zu", offsetof(zend_executor_globals, precision)); + fprintf(layouts, ", \"persistent_constants_count\": %zu", offsetof(zend_executor_globals, persistent_constants_count)); + fprintf(layouts, ", \"persistent_functions_count\": %zu", offsetof(zend_executor_globals, persistent_functions_count)); + fprintf(layouts, ", \"persistent_classes_count\": %zu", offsetof(zend_executor_globals, persistent_classes_count)); + fprintf(layouts, ", \"no_extensions\": %zu", offsetof(zend_executor_globals, no_extensions)); + fprintf(layouts, ", \"full_tables_cleanup\": %zu", offsetof(zend_executor_globals, full_tables_cleanup)); + fprintf(layouts, ", \"vm_interrupt\": %zu", offsetof(zend_executor_globals, vm_interrupt)); + fprintf(layouts, ", \"timed_out\": %zu", offsetof(zend_executor_globals, timed_out)); + fprintf(layouts, ", \"in_autoload\": %zu", offsetof(zend_executor_globals, in_autoload)); + fprintf(layouts, ", \"hard_timeout\": %zu", offsetof(zend_executor_globals, hard_timeout)); + fprintf(layouts, ", \"stack_base\": %zu", offsetof(zend_executor_globals, stack_base)); + fprintf(layouts, ", \"stack_limit\": %zu", offsetof(zend_executor_globals, stack_limit)); + fprintf(layouts, ", \"regular_list\": %zu", offsetof(zend_executor_globals, regular_list)); + fprintf(layouts, ", \"persistent_list\": %zu", offsetof(zend_executor_globals, persistent_list)); + fprintf(layouts, ", \"user_error_handler_error_reporting\": %zu", offsetof(zend_executor_globals, user_error_handler_error_reporting)); + fprintf(layouts, ", \"exception_ignore_args\": %zu", offsetof(zend_executor_globals, exception_ignore_args)); + fprintf(layouts, ", \"user_error_handler\": %zu", offsetof(zend_executor_globals, user_error_handler)); + fprintf(layouts, ", \"user_exception_handler\": %zu", offsetof(zend_executor_globals, user_exception_handler)); + fprintf(layouts, ", \"user_error_handlers_error_reporting\": %zu", offsetof(zend_executor_globals, user_error_handlers_error_reporting)); + fprintf(layouts, ", \"user_error_handlers\": %zu", offsetof(zend_executor_globals, user_error_handlers)); + fprintf(layouts, ", \"user_exception_handlers\": %zu", offsetof(zend_executor_globals, user_exception_handlers)); + fprintf(layouts, ", \"exception_class\": %zu", offsetof(zend_executor_globals, exception_class)); + fprintf(layouts, ", \"error_handling\": %zu", offsetof(zend_executor_globals, error_handling)); + fprintf(layouts, ", \"capture_warnings_during_sccp\": %zu", offsetof(zend_executor_globals, capture_warnings_during_sccp)); + fprintf(layouts, ", \"timeout_seconds\": %zu", offsetof(zend_executor_globals, timeout_seconds)); + fprintf(layouts, ", \"ini_directives\": %zu", offsetof(zend_executor_globals, ini_directives)); + fprintf(layouts, ", \"modified_ini_directives\": %zu", offsetof(zend_executor_globals, modified_ini_directives)); + fprintf(layouts, ", \"error_reporting_ini_entry\": %zu", offsetof(zend_executor_globals, error_reporting_ini_entry)); + fprintf(layouts, ", \"objects_store\": %zu", offsetof(zend_executor_globals, objects_store)); + fprintf(layouts, ", \"lazy_objects_store\": %zu", offsetof(zend_executor_globals, lazy_objects_store)); + fprintf(layouts, ", \"exception\": %zu", offsetof(zend_executor_globals, exception)); + fprintf(layouts, ", \"prev_exception\": %zu", offsetof(zend_executor_globals, prev_exception)); + fprintf(layouts, ", \"opline_before_exception\": %zu", offsetof(zend_executor_globals, opline_before_exception)); + fprintf(layouts, ", \"exception_op\": %zu", offsetof(zend_executor_globals, exception_op)); + fprintf(layouts, ", \"current_module\": %zu", offsetof(zend_executor_globals, current_module)); + fprintf(layouts, ", \"active\": %zu", offsetof(zend_executor_globals, active)); + fprintf(layouts, ", \"flags\": %zu", offsetof(zend_executor_globals, flags)); + fprintf(layouts, ", \"assertions\": %zu", offsetof(zend_executor_globals, assertions)); + fprintf(layouts, ", \"ht_iterators_count\": %zu", offsetof(zend_executor_globals, ht_iterators_count)); + fprintf(layouts, ", \"ht_iterators_used\": %zu", offsetof(zend_executor_globals, ht_iterators_used)); + fprintf(layouts, ", \"ht_iterators\": %zu", offsetof(zend_executor_globals, ht_iterators)); + fprintf(layouts, ", \"ht_iterators_slots\": %zu", offsetof(zend_executor_globals, ht_iterators_slots)); + fprintf(layouts, ", \"saved_fpu_cw_ptr\": %zu", offsetof(zend_executor_globals, saved_fpu_cw_ptr)); + fprintf(layouts, ", \"trampoline\": %zu", offsetof(zend_executor_globals, trampoline)); + fprintf(layouts, ", \"call_trampoline_op\": %zu", offsetof(zend_executor_globals, call_trampoline_op)); + fprintf(layouts, ", \"weakrefs\": %zu", offsetof(zend_executor_globals, weakrefs)); + fprintf(layouts, ", \"exception_string_param_max_len\": %zu", offsetof(zend_executor_globals, exception_string_param_max_len)); + fprintf(layouts, ", \"get_gc_buffer\": %zu", offsetof(zend_executor_globals, get_gc_buffer)); + fprintf(layouts, ", \"main_fiber_context\": %zu", offsetof(zend_executor_globals, main_fiber_context)); + fprintf(layouts, ", \"current_fiber_context\": %zu", offsetof(zend_executor_globals, current_fiber_context)); + fprintf(layouts, ", \"active_fiber\": %zu", offsetof(zend_executor_globals, active_fiber)); + fprintf(layouts, ", \"fiber_stack_size\": %zu", offsetof(zend_executor_globals, fiber_stack_size)); + fprintf(layouts, ", \"record_errors\": %zu", offsetof(zend_executor_globals, record_errors)); + fprintf(layouts, ", \"num_errors\": %zu", offsetof(zend_executor_globals, num_errors)); + fprintf(layouts, ", \"errors\": %zu", offsetof(zend_executor_globals, errors)); + fprintf(layouts, ", \"filename_override\": %zu", offsetof(zend_executor_globals, filename_override)); + fprintf(layouts, ", \"lineno_override\": %zu", offsetof(zend_executor_globals, lineno_override)); + fprintf(layouts, ", \"call_stack\": %zu", offsetof(zend_executor_globals, call_stack)); + fprintf(layouts, ", \"max_allowed_stack_size\": %zu", offsetof(zend_executor_globals, max_allowed_stack_size)); + fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); + fprintf(layouts, ", \"max_execution_timer_timer\": %zu", offsetof(zend_executor_globals, max_execution_timer_timer)); + fprintf(layouts, ", \"pid\": %zu", offsetof(zend_executor_globals, pid)); + fprintf(layouts, ", \"oldact\": %zu", offsetof(zend_executor_globals, oldact)); + fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); + fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fputs("}},\n", layouts); + fputs(" \"zend_compiler_globals\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); + fprintf(layouts, "\"loop_var_stack\": %zu", offsetof(zend_compiler_globals, loop_var_stack)); + fprintf(layouts, ", \"active_class_entry\": %zu", offsetof(zend_compiler_globals, active_class_entry)); + fprintf(layouts, ", \"compiled_filename\": %zu", offsetof(zend_compiler_globals, compiled_filename)); + fprintf(layouts, ", \"zend_lineno\": %zu", offsetof(zend_compiler_globals, zend_lineno)); + fprintf(layouts, ", \"active_op_array\": %zu", offsetof(zend_compiler_globals, active_op_array)); + fprintf(layouts, ", \"function_table\": %zu", offsetof(zend_compiler_globals, function_table)); + fprintf(layouts, ", \"class_table\": %zu", offsetof(zend_compiler_globals, class_table)); + fprintf(layouts, ", \"auto_globals\": %zu", offsetof(zend_compiler_globals, auto_globals)); + fprintf(layouts, ", \"parse_error\": %zu", offsetof(zend_compiler_globals, parse_error)); + fprintf(layouts, ", \"in_compilation\": %zu", offsetof(zend_compiler_globals, in_compilation)); + fprintf(layouts, ", \"short_tags\": %zu", offsetof(zend_compiler_globals, short_tags)); + fprintf(layouts, ", \"unclean_shutdown\": %zu", offsetof(zend_compiler_globals, unclean_shutdown)); + fprintf(layouts, ", \"ini_parser_unbuffered_errors\": %zu", offsetof(zend_compiler_globals, ini_parser_unbuffered_errors)); + fprintf(layouts, ", \"open_files\": %zu", offsetof(zend_compiler_globals, open_files)); + fprintf(layouts, ", \"ini_parser_param\": %zu", offsetof(zend_compiler_globals, ini_parser_param)); + fprintf(layouts, ", \"skip_shebang\": %zu", offsetof(zend_compiler_globals, skip_shebang)); + fprintf(layouts, ", \"increment_lineno\": %zu", offsetof(zend_compiler_globals, increment_lineno)); + fprintf(layouts, ", \"variable_width_locale\": %zu", offsetof(zend_compiler_globals, variable_width_locale)); + fprintf(layouts, ", \"ascii_compatible_locale\": %zu", offsetof(zend_compiler_globals, ascii_compatible_locale)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_compiler_globals, doc_comment)); + fprintf(layouts, ", \"extra_fn_flags\": %zu", offsetof(zend_compiler_globals, extra_fn_flags)); + fprintf(layouts, ", \"compiler_options\": %zu", offsetof(zend_compiler_globals, compiler_options)); + fprintf(layouts, ", \"context\": %zu", offsetof(zend_compiler_globals, context)); + fprintf(layouts, ", \"file_context\": %zu", offsetof(zend_compiler_globals, file_context)); + fprintf(layouts, ", \"arena\": %zu", offsetof(zend_compiler_globals, arena)); + fprintf(layouts, ", \"interned_strings\": %zu", offsetof(zend_compiler_globals, interned_strings)); + fprintf(layouts, ", \"script_encoding_list\": %zu", offsetof(zend_compiler_globals, script_encoding_list)); + fprintf(layouts, ", \"script_encoding_list_size\": %zu", offsetof(zend_compiler_globals, script_encoding_list_size)); + fprintf(layouts, ", \"multibyte\": %zu", offsetof(zend_compiler_globals, multibyte)); + fprintf(layouts, ", \"detect_unicode\": %zu", offsetof(zend_compiler_globals, detect_unicode)); + fprintf(layouts, ", \"encoding_declared\": %zu", offsetof(zend_compiler_globals, encoding_declared)); + fprintf(layouts, ", \"ast\": %zu", offsetof(zend_compiler_globals, ast)); + fprintf(layouts, ", \"ast_arena\": %zu", offsetof(zend_compiler_globals, ast_arena)); + fprintf(layouts, ", \"delayed_oplines_stack\": %zu", offsetof(zend_compiler_globals, delayed_oplines_stack)); + fprintf(layouts, ", \"memoized_exprs\": %zu", offsetof(zend_compiler_globals, memoized_exprs)); + fprintf(layouts, ", \"memoize_mode\": %zu", offsetof(zend_compiler_globals, memoize_mode)); + fprintf(layouts, ", \"map_ptr_real_base\": %zu", offsetof(zend_compiler_globals, map_ptr_real_base)); + fprintf(layouts, ", \"map_ptr_base\": %zu", offsetof(zend_compiler_globals, map_ptr_base)); + fprintf(layouts, ", \"map_ptr_size\": %zu", offsetof(zend_compiler_globals, map_ptr_size)); + fprintf(layouts, ", \"map_ptr_last\": %zu", offsetof(zend_compiler_globals, map_ptr_last)); + fprintf(layouts, ", \"delayed_variance_obligations\": %zu", offsetof(zend_compiler_globals, delayed_variance_obligations)); + fprintf(layouts, ", \"delayed_autoloads\": %zu", offsetof(zend_compiler_globals, delayed_autoloads)); + fprintf(layouts, ", \"unlinked_uses\": %zu", offsetof(zend_compiler_globals, unlinked_uses)); + fprintf(layouts, ", \"current_linking_class\": %zu", offsetof(zend_compiler_globals, current_linking_class)); + fprintf(layouts, ", \"rtd_key_counter\": %zu", offsetof(zend_compiler_globals, rtd_key_counter)); + fprintf(layouts, ", \"internal_run_time_cache\": %zu", offsetof(zend_compiler_globals, internal_run_time_cache)); + fprintf(layouts, ", \"internal_run_time_cache_size\": %zu", offsetof(zend_compiler_globals, internal_run_time_cache_size)); + fprintf(layouts, ", \"short_circuiting_opnums\": %zu", offsetof(zend_compiler_globals, short_circuiting_opnums)); + fprintf(layouts, ", \"copied_functions_count\": %zu", offsetof(zend_compiler_globals, copied_functions_count)); + fputs("}},\n", layouts); + fputs(" \"zend_module_entry\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_module_entry)); + fprintf(layouts, "\"size\": %zu", offsetof(zend_module_entry, size)); + fprintf(layouts, ", \"zend_api\": %zu", offsetof(zend_module_entry, zend_api)); + fprintf(layouts, ", \"zend_debug\": %zu", offsetof(zend_module_entry, zend_debug)); + fprintf(layouts, ", \"zts\": %zu", offsetof(zend_module_entry, zts)); + fprintf(layouts, ", \"ini_entry\": %zu", offsetof(zend_module_entry, ini_entry)); + fprintf(layouts, ", \"deps\": %zu", offsetof(zend_module_entry, deps)); + fprintf(layouts, ", \"name\": %zu", offsetof(zend_module_entry, name)); + fprintf(layouts, ", \"functions\": %zu", offsetof(zend_module_entry, functions)); + fprintf(layouts, ", \"module_startup_func\": %zu", offsetof(zend_module_entry, module_startup_func)); + fprintf(layouts, ", \"module_shutdown_func\": %zu", offsetof(zend_module_entry, module_shutdown_func)); + fprintf(layouts, ", \"request_startup_func\": %zu", offsetof(zend_module_entry, request_startup_func)); + fprintf(layouts, ", \"request_shutdown_func\": %zu", offsetof(zend_module_entry, request_shutdown_func)); + fprintf(layouts, ", \"info_func\": %zu", offsetof(zend_module_entry, info_func)); + fprintf(layouts, ", \"version\": %zu", offsetof(zend_module_entry, version)); + fprintf(layouts, ", \"globals_size\": %zu", offsetof(zend_module_entry, globals_size)); + fprintf(layouts, ", \"globals_id_ptr\": %zu", offsetof(zend_module_entry, globals_id_ptr)); + fprintf(layouts, ", \"globals_ctor\": %zu", offsetof(zend_module_entry, globals_ctor)); + fprintf(layouts, ", \"globals_dtor\": %zu", offsetof(zend_module_entry, globals_dtor)); + fprintf(layouts, ", \"post_deactivate_func\": %zu", offsetof(zend_module_entry, post_deactivate_func)); + fprintf(layouts, ", \"module_started\": %zu", offsetof(zend_module_entry, module_started)); + fprintf(layouts, ", \"type\": %zu", offsetof(zend_module_entry, type)); + fprintf(layouts, ", \"handle\": %zu", offsetof(zend_module_entry, handle)); + fprintf(layouts, ", \"module_number\": %zu", offsetof(zend_module_entry, module_number)); + fprintf(layouts, ", \"build_id\": %zu", offsetof(zend_module_entry, build_id)); + fputs("}},\n", layouts); + fputs(" \"zend_module_dep\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_module_dep)); + fprintf(layouts, "\"name\": %zu", offsetof(zend_module_dep, name)); + fprintf(layouts, ", \"rel\": %zu", offsetof(zend_module_dep, rel)); + fprintf(layouts, ", \"version\": %zu", offsetof(zend_module_dep, version)); + fprintf(layouts, ", \"type\": %zu", offsetof(zend_module_dep, type)); + fputs("}},\n", layouts); + fputs(" \"zend_object_handlers\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_object_handlers)); + fprintf(layouts, "\"offset\": %zu", offsetof(zend_object_handlers, offset)); + fprintf(layouts, ", \"free_obj\": %zu", offsetof(zend_object_handlers, free_obj)); + fprintf(layouts, ", \"dtor_obj\": %zu", offsetof(zend_object_handlers, dtor_obj)); + fprintf(layouts, ", \"clone_obj\": %zu", offsetof(zend_object_handlers, clone_obj)); + fprintf(layouts, ", \"read_property\": %zu", offsetof(zend_object_handlers, read_property)); + fprintf(layouts, ", \"write_property\": %zu", offsetof(zend_object_handlers, write_property)); + fprintf(layouts, ", \"read_dimension\": %zu", offsetof(zend_object_handlers, read_dimension)); + fprintf(layouts, ", \"write_dimension\": %zu", offsetof(zend_object_handlers, write_dimension)); + fprintf(layouts, ", \"get_property_ptr_ptr\": %zu", offsetof(zend_object_handlers, get_property_ptr_ptr)); + fprintf(layouts, ", \"has_property\": %zu", offsetof(zend_object_handlers, has_property)); + fprintf(layouts, ", \"unset_property\": %zu", offsetof(zend_object_handlers, unset_property)); + fprintf(layouts, ", \"has_dimension\": %zu", offsetof(zend_object_handlers, has_dimension)); + fprintf(layouts, ", \"unset_dimension\": %zu", offsetof(zend_object_handlers, unset_dimension)); + fprintf(layouts, ", \"get_properties\": %zu", offsetof(zend_object_handlers, get_properties)); + fprintf(layouts, ", \"get_method\": %zu", offsetof(zend_object_handlers, get_method)); + fprintf(layouts, ", \"get_constructor\": %zu", offsetof(zend_object_handlers, get_constructor)); + fprintf(layouts, ", \"get_class_name\": %zu", offsetof(zend_object_handlers, get_class_name)); + fprintf(layouts, ", \"cast_object\": %zu", offsetof(zend_object_handlers, cast_object)); + fprintf(layouts, ", \"count_elements\": %zu", offsetof(zend_object_handlers, count_elements)); + fprintf(layouts, ", \"get_debug_info\": %zu", offsetof(zend_object_handlers, get_debug_info)); + fprintf(layouts, ", \"get_closure\": %zu", offsetof(zend_object_handlers, get_closure)); + fprintf(layouts, ", \"get_gc\": %zu", offsetof(zend_object_handlers, get_gc)); + fprintf(layouts, ", \"do_operation\": %zu", offsetof(zend_object_handlers, do_operation)); + fprintf(layouts, ", \"compare\": %zu", offsetof(zend_object_handlers, compare)); + fprintf(layouts, ", \"get_properties_for\": %zu", offsetof(zend_object_handlers, get_properties_for)); + fputs("}},\n", layouts); + fputs(" \"zend_object_iterator\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_object_iterator)); + fprintf(layouts, "\"std\": %zu", offsetof(zend_object_iterator, std)); + fprintf(layouts, ", \"data\": %zu", offsetof(zend_object_iterator, data)); + fprintf(layouts, ", \"funcs\": %zu", offsetof(zend_object_iterator, funcs)); + fprintf(layouts, ", \"index\": %zu", offsetof(zend_object_iterator, index)); + fputs("}},\n", layouts); + fputs(" \"zend_object_iterator_funcs\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_object_iterator_funcs)); + fprintf(layouts, "\"dtor\": %zu", offsetof(zend_object_iterator_funcs, dtor)); + fprintf(layouts, ", \"valid\": %zu", offsetof(zend_object_iterator_funcs, valid)); + fprintf(layouts, ", \"get_current_data\": %zu", offsetof(zend_object_iterator_funcs, get_current_data)); + fprintf(layouts, ", \"get_current_key\": %zu", offsetof(zend_object_iterator_funcs, get_current_key)); + fprintf(layouts, ", \"move_forward\": %zu", offsetof(zend_object_iterator_funcs, move_forward)); + fprintf(layouts, ", \"rewind\": %zu", offsetof(zend_object_iterator_funcs, rewind)); + fprintf(layouts, ", \"invalidate_current\": %zu", offsetof(zend_object_iterator_funcs, invalidate_current)); + fprintf(layouts, ", \"get_gc\": %zu", offsetof(zend_object_iterator_funcs, get_gc)); + fputs("}},\n", layouts); + fputs(" \"zend_ast\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_ast)); + fprintf(layouts, "\"kind\": %zu", offsetof(zend_ast, kind)); + fprintf(layouts, ", \"attr\": %zu", offsetof(zend_ast, attr)); + fprintf(layouts, ", \"lineno\": %zu", offsetof(zend_ast, lineno)); + fprintf(layouts, ", \"child\": %zu", offsetof(zend_ast, child)); + fputs("}},\n", layouts); + fputs(" \"zend_ast_decl\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_ast_decl)); + fprintf(layouts, "\"kind\": %zu", offsetof(zend_ast_decl, kind)); + fprintf(layouts, ", \"attr\": %zu", offsetof(zend_ast_decl, attr)); + fprintf(layouts, ", \"start_lineno\": %zu", offsetof(zend_ast_decl, start_lineno)); + fprintf(layouts, ", \"end_lineno\": %zu", offsetof(zend_ast_decl, end_lineno)); + fprintf(layouts, ", \"flags\": %zu", offsetof(zend_ast_decl, flags)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_ast_decl, doc_comment)); + fprintf(layouts, ", \"name\": %zu", offsetof(zend_ast_decl, name)); + fprintf(layouts, ", \"child\": %zu", offsetof(zend_ast_decl, child)); + fputs("}},\n", layouts); + fputs(" \"zend_ast_list\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_ast_list)); + fprintf(layouts, "\"kind\": %zu", offsetof(zend_ast_list, kind)); + fprintf(layouts, ", \"attr\": %zu", offsetof(zend_ast_list, attr)); + fprintf(layouts, ", \"lineno\": %zu", offsetof(zend_ast_list, lineno)); + fprintf(layouts, ", \"children\": %zu", offsetof(zend_ast_list, children)); + fprintf(layouts, ", \"child\": %zu", offsetof(zend_ast_list, child)); + fputs("}},\n", layouts); + fputs(" \"zend_ast_zval\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_ast_zval)); + fprintf(layouts, "\"kind\": %zu", offsetof(zend_ast_zval, kind)); + fprintf(layouts, ", \"attr\": %zu", offsetof(zend_ast_zval, attr)); + fprintf(layouts, ", \"val\": %zu", offsetof(zend_ast_zval, val)); + fputs("}},\n", layouts); + fputs(" \"zend_lex_state\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_lex_state)); + fprintf(layouts, "\"yy_leng\": %zu", offsetof(zend_lex_state, yy_leng)); + fprintf(layouts, ", \"yy_start\": %zu", offsetof(zend_lex_state, yy_start)); + fprintf(layouts, ", \"yy_text\": %zu", offsetof(zend_lex_state, yy_text)); + fprintf(layouts, ", \"yy_cursor\": %zu", offsetof(zend_lex_state, yy_cursor)); + fprintf(layouts, ", \"yy_marker\": %zu", offsetof(zend_lex_state, yy_marker)); + fprintf(layouts, ", \"yy_limit\": %zu", offsetof(zend_lex_state, yy_limit)); + fprintf(layouts, ", \"yy_state\": %zu", offsetof(zend_lex_state, yy_state)); + fprintf(layouts, ", \"state_stack\": %zu", offsetof(zend_lex_state, state_stack)); + fprintf(layouts, ", \"heredoc_label_stack\": %zu", offsetof(zend_lex_state, heredoc_label_stack)); + fprintf(layouts, ", \"nest_location_stack\": %zu", offsetof(zend_lex_state, nest_location_stack)); + fprintf(layouts, ", \"in\": %zu", offsetof(zend_lex_state, in)); + fprintf(layouts, ", \"lineno\": %zu", offsetof(zend_lex_state, lineno)); + fprintf(layouts, ", \"filename\": %zu", offsetof(zend_lex_state, filename)); + fprintf(layouts, ", \"script_org\": %zu", offsetof(zend_lex_state, script_org)); + fprintf(layouts, ", \"script_org_size\": %zu", offsetof(zend_lex_state, script_org_size)); + fprintf(layouts, ", \"script_filtered\": %zu", offsetof(zend_lex_state, script_filtered)); + fprintf(layouts, ", \"script_filtered_size\": %zu", offsetof(zend_lex_state, script_filtered_size)); + fprintf(layouts, ", \"input_filter\": %zu", offsetof(zend_lex_state, input_filter)); + fprintf(layouts, ", \"output_filter\": %zu", offsetof(zend_lex_state, output_filter)); + fprintf(layouts, ", \"script_encoding\": %zu", offsetof(zend_lex_state, script_encoding)); + fprintf(layouts, ", \"on_event\": %zu", offsetof(zend_lex_state, on_event)); + fprintf(layouts, ", \"on_event_context\": %zu", offsetof(zend_lex_state, on_event_context)); + fprintf(layouts, ", \"ast\": %zu", offsetof(zend_lex_state, ast)); + fprintf(layouts, ", \"ast_arena\": %zu", offsetof(zend_lex_state, ast_arena)); + fputs("}},\n", layouts); + fputs(" \"zend_closure\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_closure)); + fprintf(layouts, "\"std\": %zu", offsetof(zend_closure, std)); + fprintf(layouts, ", \"func\": %zu", offsetof(zend_closure, func)); + fprintf(layouts, ", \"this_ptr\": %zu", offsetof(zend_closure, this_ptr)); + fprintf(layouts, ", \"called_scope\": %zu", offsetof(zend_closure, called_scope)); + fprintf(layouts, ", \"orig_internal_handler\": %zu", offsetof(zend_closure, orig_internal_handler)); + fputs("}},\n", layouts); + fputs(" \"zend_script\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_script)); + fprintf(layouts, "\"filename\": %zu", offsetof(zend_script, filename)); + fprintf(layouts, ", \"main_op_array\": %zu", offsetof(zend_script, main_op_array)); + fprintf(layouts, ", \"function_table\": %zu", offsetof(zend_script, function_table)); + fprintf(layouts, ", \"class_table\": %zu", offsetof(zend_script, class_table)); + fputs("}},\n", layouts); + fputs(" \"zend_error_info\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_error_info)); + fprintf(layouts, "\"type\": %zu", offsetof(zend_error_info, type)); + fprintf(layouts, ", \"lineno\": %zu", offsetof(zend_error_info, lineno)); + fprintf(layouts, ", \"filename\": %zu", offsetof(zend_error_info, filename)); + fprintf(layouts, ", \"message\": %zu", offsetof(zend_error_info, message)); + fputs("}},\n", layouts); + fputs(" \"zend_early_binding\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_early_binding)); + fprintf(layouts, "\"lcname\": %zu", offsetof(zend_early_binding, lcname)); + fprintf(layouts, ", \"rtd_key\": %zu", offsetof(zend_early_binding, rtd_key)); + fprintf(layouts, ", \"lc_parent_name\": %zu", offsetof(zend_early_binding, lc_parent_name)); + fprintf(layouts, ", \"cache_slot\": %zu", offsetof(zend_early_binding, cache_slot)); + fputs("}},\n", layouts); + fputs(" \"zend_persistent_script\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_persistent_script)); + fprintf(layouts, "\"script\": %zu", offsetof(zend_persistent_script, script)); + fprintf(layouts, ", \"compiler_halt_offset\": %zu", offsetof(zend_persistent_script, compiler_halt_offset)); + fprintf(layouts, ", \"ping_auto_globals_mask\": %zu", offsetof(zend_persistent_script, ping_auto_globals_mask)); + fprintf(layouts, ", \"timestamp\": %zu", offsetof(zend_persistent_script, timestamp)); + fprintf(layouts, ", \"corrupted\": %zu", offsetof(zend_persistent_script, corrupted)); + fprintf(layouts, ", \"is_phar\": %zu", offsetof(zend_persistent_script, is_phar)); + fprintf(layouts, ", \"empty\": %zu", offsetof(zend_persistent_script, empty)); + fprintf(layouts, ", \"num_warnings\": %zu", offsetof(zend_persistent_script, num_warnings)); + fprintf(layouts, ", \"num_early_bindings\": %zu", offsetof(zend_persistent_script, num_early_bindings)); + fprintf(layouts, ", \"warnings\": %zu", offsetof(zend_persistent_script, warnings)); + fprintf(layouts, ", \"early_bindings\": %zu", offsetof(zend_persistent_script, early_bindings)); + fprintf(layouts, ", \"mem\": %zu", offsetof(zend_persistent_script, mem)); + fprintf(layouts, ", \"size\": %zu", offsetof(zend_persistent_script, size)); + fprintf(layouts, ", \"dynamic_members\": %zu", offsetof(zend_persistent_script, dynamic_members)); + fputs("}},\n", layouts); + fputs(" \"zend_file_cache_metainfo\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_file_cache_metainfo)); + fprintf(layouts, "\"magic\": %zu", offsetof(zend_file_cache_metainfo, magic)); + fprintf(layouts, ", \"system_id\": %zu", offsetof(zend_file_cache_metainfo, system_id)); + fprintf(layouts, ", \"mem_size\": %zu", offsetof(zend_file_cache_metainfo, mem_size)); + fprintf(layouts, ", \"str_size\": %zu", offsetof(zend_file_cache_metainfo, str_size)); + fprintf(layouts, ", \"script_offset\": %zu", offsetof(zend_file_cache_metainfo, script_offset)); + fprintf(layouts, ", \"timestamp\": %zu", offsetof(zend_file_cache_metainfo, timestamp)); + fprintf(layouts, ", \"checksum\": %zu", offsetof(zend_file_cache_metainfo, checksum)); + fputs("}}\n", layouts); + fputs(" }\n}\n", layouts); + fclose(layouts); + return 0; +} From 6519be4643de3e21d66c1e124730fac3146e09d1 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 19:35:45 +0000 Subject: [PATCH 03/10] feat(core): resolve EG/CG through the TSRM on ZTS builds Core::init() now resolves the per-thread executor/compiler globals exactly like the engine's own EG()/CG() fast path: tsrm_get_ls_cache() plus the engine-exported executor_globals_offset/compiler_globals_offset. The NTS path is untouched and the public API is unchanged - Executor/Compiler receive the same struct CData species as before. Extracting the returned void* value needs care: a call-returned pointer CData carries the target, not a slot, so the base is read through a typed integer view of an addr() slot (the shape PayloadRelocator::ptrValue already documents). Core::threadLocalStorageBase() exposes the resolved base internally for the module-globals accessor. The smoke test proves the resolved view is the live per-thread block: a native error_reporting() write must be immediately visible through Core::$executor. Closes #60 (runtime part) Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019mWPLkDoKWoDDS9W9LSaDa --- phpstan-baseline.neon | 12 ++++++ src/Core.php | 72 ++++++++++++++++++++++++++++++-- tests/System/TsrmGlobalsTest.php | 65 ++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+), 3 deletions(-) create mode 100644 tests/System/TsrmGlobalsTest.php diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index af901c1..d713102 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -642,12 +642,24 @@ parameters: count: 1 path: src/Core.php + - + message: '#^Access to an undefined property FFI\:\:\$compiler_globals_offset\.$#' + identifier: property.notFound + count: 1 + path: src/Core.php + - message: '#^Access to an undefined property FFI\:\:\$executor_globals\.$#' identifier: property.notFound count: 1 path: src/Core.php + - + message: '#^Access to an undefined property FFI\:\:\$executor_globals_offset\.$#' + identifier: property.notFound + count: 1 + path: src/Core.php + - message: '#^Access to an undefined property FFI\:\:\$module_registry\.$#' identifier: property.notFound diff --git a/src/Core.php b/src/Core.php index 6e354b2..07b430d 100644 --- a/src/Core.php +++ b/src/Core.php @@ -272,9 +272,17 @@ public static function init(): void self::verifyEngineLayouts($engine); } - self::$executor = new Executor($engine->executor_globals); - self::$compiler = new Compiler($engine->compiler_globals); - self::$modules = HashTable::fromCData(Core::addr($engine->module_registry)); + if (\ZEND_THREAD_SAFE) { + // ZTS: executor_globals/compiler_globals are not linkable symbols - the + // globals are per-thread and live inside the TSRM local-storage block, + // reached exactly like the engine's own EG()/CG() fast path (issue #60) + self::$executor = new Executor(self::threadGlobals('zend_executor_globals', $engine->executor_globals_offset)); + self::$compiler = new Compiler(self::threadGlobals('zend_compiler_globals', $engine->compiler_globals_offset)); + } else { + self::$executor = new Executor($engine->executor_globals); + self::$compiler = new Compiler($engine->compiler_globals); + } + self::$modules = HashTable::fromCData(Core::addr($engine->module_registry)); // Deterministic teardown: user shutdown functions run before object destructors and // before ext/ffi RSHUTDOWN frees the callback trampolines, so every hooked engine @@ -355,6 +363,64 @@ private static function assertSupportedEnvironment(): void } } + /** + * Resolves a per-thread engine globals struct (EG/CG) through the TSRM on ZTS builds. + * + * Mirrors the engine's own EG()/CG() macro expansion (zend_globals_macros.h): + * + * (zend_executor_globals *)((char *) tsrm_get_ls_cache() + executor_globals_offset) + * + * tsrm_get_ls_cache() returns the CALLING thread's local-storage block and the FFI + * call runs on the requesting PHP thread, so the resolved struct is exactly this + * thread's globals. PHP statics are per-thread on ZTS, so the wrappers Core::init() + * caches from this view can never leak across threads - a thread that boots z-engine + * runs Core::init() itself and resolves its own block. + * + * @param string $structName Globals struct type, e.g. "zend_executor_globals" + * @param mixed $offset Engine-exported byte offset inside the TSRM block + */ + private static function threadGlobals(string $structName, mixed $offset): CData + { + if (!\is_int($offset)) { + throw new RuntimeException("The engine-exported TSRM offset for {$structName} is not an integer"); + } + $globals = self::pointerAtAddress($structName . ' *', self::threadLocalStorageBase() + $offset)[0]; + if (!$globals instanceof CData) { + throw new RuntimeException("Unable to resolve the per-thread {$structName} block through the TSRM"); + } + + return $globals; + } + + /** + * Address of the calling thread's TSRM local-storage block (ZTS builds only). + * + * This is the base the engine's TSRMG* accessor family works from: the fast + * EG/CG offsets are relative to it, and its first field is the per-resource + * storage array used for module globals (TSRMG_BULK). + * + * @internal only meaningful on ZTS builds; requires the engine binding to be loaded + */ + public static function threadLocalStorageBase(): int + { + $lsCache = self::call('tsrm_get_ls_cache'); + if (!$lsCache instanceof CData) { + throw new RuntimeException('tsrm_get_ls_cache() did not return a pointer'); + } + // A call-returned void* carries the TARGET, not a slot: addressOf() on it + // reinterprets pointee bytes and addr()+addressOf() yields the temporary + // slot's own address. Reading the slot through a typed integer view is the + // one shape that extracts the returned pointer's value. + $base = self::cast('uintptr_t *', self::addr($lsCache))[0]; + if (!\is_int($base) || $base === 0) { + throw new RuntimeException( + 'TSRM local storage is not initialized for this thread - Core::init() must run on a PHP-managed thread', + ); + } + + return $base; + } + /** * Platform selector for the generated per-ABI artifacts, e.g. "8.4/linux-x64-nts" */ diff --git a/tests/System/TsrmGlobalsTest.php b/tests/System/TsrmGlobalsTest.php new file mode 100644 index 0000000..44e4175 --- /dev/null +++ b/tests/System/TsrmGlobalsTest.php @@ -0,0 +1,65 @@ + + * + * This source file is subject to the license that is bundled + * with this source code in the file LICENSE. + * + */ +declare(strict_types=1); + +namespace ZEngine\System; + +use PHPUnit\Framework\TestCase; +use ZEngine\Core; + +/** + * Smoke test for the executor/compiler globals resolution in Core::init(). + * + * On NTS builds EG/CG are plain extern symbols; on ZTS builds Core resolves them + * through the TSRM (tsrm_get_ls_cache() + the engine-exported byte offsets, the + * same fast path the EG()/CG() macros compile to - issue #60). These tests prove + * the resolved view is the LIVE per-thread globals block, not a stale or + * misaligned address. + */ +class TsrmGlobalsTest extends TestCase +{ + public function testExecutorGlobalsAreLive(): void + { + $functionName = 'zengine_tsrm_probe_' . bin2hex(random_bytes(8)); + eval("function {$functionName}() {}"); + + $entry = Core::$executor->functionTable->find($functionName); + $this->assertNotNull($entry, 'A function defined at runtime must be visible through EG(function_table)'); + $this->assertNotNull( + Core::$executor->classTable->find(strtolower(self::class)), + 'The running test class must be visible through EG(class_table)', + ); + } + + public function testTsrmResolvedGlobalsTrackNativeEngineState(): void + { + if (!\ZEND_THREAD_SAFE) { + self::markTestSkipped('TSRM resolution only exists on ZTS builds'); + } + + // A native write into EG(error_reporting) must be visible through the + // TSRM-resolved view immediately: on a misresolved base this reads back + // stale heap bytes instead of the live per-thread value + $original = error_reporting(); + try { + error_reporting(E_ERROR); + $this->assertSame( + E_ERROR, + Core::$executor->getErrorReporting(), + 'Core::$executor must wrap the same EG block the engine macros mutate', + ); + } finally { + error_reporting($original); + } + $this->assertSame($original, Core::$executor->getErrorReporting()); + } +} From 1fce35cbd3f7bde9a2e05d13240ed45f5da50f01 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 19:35:45 +0000 Subject: [PATCH 04/10] feat(module): thread-safe module globals registration and access zend_module_entry has no globals_ptr on ZTS - the entry carries a pointer to a ts_rsrc_id slot that zend_startup_module_ex() hands to ts_allocate_id(), and the TSRM allocates the per-thread globals itself. AbstractModule::register() now fills globals_id_ptr on ZTS, and ReflectionExtension::getGlobals() resolves the calling thread's block the same way as ZEND_MODULE_GLOBALS_ACCESSOR (entry->storage[id - 1]). Part of #60 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019mWPLkDoKWoDDS9W9LSaDa --- src/EngineExtension/AbstractModule.php | 14 +++++++++++--- src/Reflection/ReflectionExtension.php | 25 ++++++++++++++++++++++++- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/EngineExtension/AbstractModule.php b/src/EngineExtension/AbstractModule.php index e8f658f..867379c 100644 --- a/src/EngineExtension/AbstractModule.php +++ b/src/EngineExtension/AbstractModule.php @@ -144,10 +144,18 @@ final public function register(): void $globalType = static::globalType(); if ($globalType !== null) { - // The engine dereferences globals_ptr for the module's whole registry lifetime $module->globals_size = Core::sizeof(Core::type($globalType)); - $memoryStructure = Core::trackedNew($globalType, true); - $module->globals_ptr = Core::addr($memoryStructure); + if (\ZEND_THREAD_SAFE) { + // On ZTS the entry carries a pointer to a ts_rsrc_id slot instead of the + // globals block: zend_startup_module_ex() passes it to ts_allocate_id(), + // and the TSRM allocates (and frees) the per-thread globals itself + $resourceIdSlot = Core::trackedNew('ts_rsrc_id', true); + $module->globals_id_ptr = Core::addr($resourceIdSlot); + } else { + // The engine dereferences globals_ptr for the module's whole registry lifetime + $memoryStructure = Core::trackedNew($globalType, true); + $module->globals_ptr = Core::addr($memoryStructure); + } } $this->attachDependencies($module); diff --git a/src/Reflection/ReflectionExtension.php b/src/Reflection/ReflectionExtension.php index dd20876..3eb04ce 100644 --- a/src/Reflection/ReflectionExtension.php +++ b/src/Reflection/ReflectionExtension.php @@ -107,10 +107,33 @@ public function getGlobalsSize(): int /** * Returns a pointer (if any) to global memory area or null if extension doesn't use global memory structure + * + * On ZTS builds the entry stores a TSRM resource id instead of a direct pointer; + * the returned view is the CALLING thread's globals block, resolved the same way + * as the engine's ZEND_MODULE_GLOBALS_ACCESSOR (entry->storage[id - 1]). */ public function getGlobals(): ?CData { - return $this->moduleEntry->globals_ptr; + if (!\ZEND_THREAD_SAFE) { + return $this->moduleEntry->globals_ptr; + } + + $idPointer = $this->moduleEntry->globals_id_ptr; + if (!$idPointer instanceof CData) { + return null; + } + $resourceId = $idPointer[0]; + if (!\is_int($resourceId) || $resourceId === 0) { + return null; + } + // TSRMG_BULK: (*(void ***) tsrm_get_ls_cache())[id - 1] + $storage = Core::pointerAtAddress('void ***', Core::threadLocalStorageBase())[0]; + if (!$storage instanceof CData) { + return null; + } + $globals = $storage[$resourceId - 1]; + + return $globals instanceof CData ? $globals : null; } /** From 47b38f405074b23b52dc34de7a25918ac0f8010e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 19:35:45 +0000 Subject: [PATCH 05/10] fix(opcache): reject ZTS file-cache payloads until #118 ZTS payloads use a different binary layout, so PayloadRelocator now refuses them explicitly instead of walking them wrong. The relocator tests carry an opcache-relocator group and self-skip on ZTS; the new test:opcache-zts script is the ZTS non-skip gate for the remaining opcache/SHM coverage (issue #124 semantics preserved). Part of #60, tracked in #118 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019mWPLkDoKWoDDS9W9LSaDa --- composer.json | 2 ++ src/OpCache/PayloadRelocator.php | 8 +++++++- tests/OpCache/ReflectionOpcacheFileTest.php | 8 ++++++++ tests/OpCache/RefreshWorkflowTest.php | 8 ++++++++ tests/OpCache/SerializerRoundTripTest.php | 8 ++++++++ 5 files changed, 33 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 676e2ba..b0bbeac 100644 --- a/composer.json +++ b/composer.json @@ -36,6 +36,7 @@ "test": "phpunit", "test:internal": "phpunit --group internal --process-isolation", "test:opcache": "phpunit --group opcache --fail-on-skipped", + "test:opcache-zts": "phpunit --group opcache --exclude-group opcache-relocator --fail-on-skipped", "phpstan": "phpstan analyse", "cs:check": "php-cs-fixer fix --dry-run --diff", "cs:fix": "php-cs-fixer fix", @@ -45,6 +46,7 @@ "test": "Run the test suite (segfault-prone internal group excluded)", "test:internal": "Run the segfault-prone internal test group with process isolation (use a debug PHP build)", "test:opcache": "Run the opcache/shared-memory tests and FAIL if any of them skipped (they are self-skipping when opcache is unavailable)", + "test:opcache-zts": "Same non-skip gate for ZTS builds: excludes the file-cache relocator tests, which do not support ZTS payloads yet (issue #118)", "phpstan": "Run static analysis at the maximum level", "cs:check": "Check coding standards without fixing", "cs:fix": "Fix coding standards", diff --git a/src/OpCache/PayloadRelocator.php b/src/OpCache/PayloadRelocator.php index c08e87c..ab78535 100644 --- a/src/OpCache/PayloadRelocator.php +++ b/src/OpCache/PayloadRelocator.php @@ -21,7 +21,8 @@ * Turns the position-independent file-cache payload into a live in-memory * image and back, a faithful port of ext/opcache/zend_file_cache.c * (unserialize = {@see relocate}, serialize = {@see derelocate}) for the - * linux-x64 non-thread-safe build. + * linux-x64 non-thread-safe build. Thread-safe (ZTS) payloads use a different + * binary layout and are rejected until issue #118 lands ZTS-specific walking. * * In the file every interior pointer is stored as a byte offset from the * buffer start (SERIALIZE_PTR) and every interned string as a tagged offset @@ -86,6 +87,11 @@ public function __construct(private readonly CData $buffer, private readonly Cac if (PHP_INT_SIZE !== 8 || \DIRECTORY_SEPARATOR !== '/') { throw OpCacheException::unsupportedPayload('the relocator supports 64-bit non-Windows builds only'); } + if (\ZEND_THREAD_SAFE) { + throw OpCacheException::unsupportedPayload( + 'ZTS file-cache payloads use a different binary layout - tracked in issue #118', + ); + } $this->base = Core::addressOf(Core::addr($buffer)); $this->size = $metaInfo->memSize(); $this->strSectionBase = $this->base + $this->size; diff --git a/tests/OpCache/ReflectionOpcacheFileTest.php b/tests/OpCache/ReflectionOpcacheFileTest.php index cb5391f..d916ab0 100644 --- a/tests/OpCache/ReflectionOpcacheFileTest.php +++ b/tests/OpCache/ReflectionOpcacheFileTest.php @@ -17,10 +17,18 @@ use PHPUnit\Framework\TestCase; #[Group('opcache')] +#[Group('opcache-relocator')] final class ReflectionOpcacheFileTest extends TestCase { use FileCacheFixture; + protected function setUp(): void + { + if (\ZEND_THREAD_SAFE) { + self::markTestSkipped('The file-cache relocator does not support ZTS payloads yet (issue #118)'); + } + } + protected function tearDown(): void { self::removeCacheDir(); diff --git a/tests/OpCache/RefreshWorkflowTest.php b/tests/OpCache/RefreshWorkflowTest.php index 32bc72e..5e22e7b 100644 --- a/tests/OpCache/RefreshWorkflowTest.php +++ b/tests/OpCache/RefreshWorkflowTest.php @@ -23,10 +23,18 @@ * a fresh worker executes the patched code. */ #[Group('opcache')] +#[Group('opcache-relocator')] final class RefreshWorkflowTest extends TestCase { use FileCacheFixture; + protected function setUp(): void + { + if (\ZEND_THREAD_SAFE) { + self::markTestSkipped('The file-cache relocator does not support ZTS payloads yet (issue #118)'); + } + } + protected function tearDown(): void { self::removeCacheDir(); diff --git a/tests/OpCache/SerializerRoundTripTest.php b/tests/OpCache/SerializerRoundTripTest.php index 04ed709..250872b 100644 --- a/tests/OpCache/SerializerRoundTripTest.php +++ b/tests/OpCache/SerializerRoundTripTest.php @@ -23,10 +23,18 @@ * untouched round trip, and that a patched binary is what the engine executes. */ #[Group('opcache')] +#[Group('opcache-relocator')] final class SerializerRoundTripTest extends TestCase { use FileCacheFixture; + protected function setUp(): void + { + if (\ZEND_THREAD_SAFE) { + self::markTestSkipped('The file-cache relocator does not support ZTS payloads yet (issue #118)'); + } + } + protected function tearDown(): void { self::removeCacheDir(); From 47cdd68bb23c22b1fa0ef3164c6c686def6ce705 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 19:35:45 +0000 Subject: [PATCH 06/10] ci: run release and debug test legs on ZTS Both the release tests job and the debug internal-group job now run a NTS x ZTS matrix: setup-php provides the thread-safe build via phpts, and the debug Dockerfile gains a PHP_TS build-arg that adds --enable-zts to the source rebuild. The header-drift job covers the new zts target automatically through the generator's default target list. The ZTS legs gate opcache coverage with the relocator group excluded (#118). NOTE: the debug job's required-check name now carries the matrix label ("Internal group (debug build, NTS)") - branch protection rules need updating. Part of #60 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019mWPLkDoKWoDDS9W9LSaDa --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++--- tools/docker/php-debug.Dockerfile | 21 +++++++++++----- 2 files changed, 52 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 644826b..8d1b1ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,21 @@ env: jobs: tests: - name: Tests (release, NTS) + name: Tests (release, ${{ matrix.ts_label }}) runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - ts: nts + ts_label: NTS + opcache_gate: composer test:opcache + - ts: zts + ts_label: ZTS + # The file-cache relocator does not support ZTS payloads yet + # (issue #118): its tests self-skip on ZTS, so the non-skip gate + # excludes that group while still proving the SHM tests ran + opcache_gate: composer test:opcache-zts steps: - uses: actions/checkout@v4 @@ -28,12 +41,19 @@ jobs: # off everywhere: it rewrites the executor internals z-engine hooks into # (AGENTS.md). uses: shivammathur/setup-php@v2 + env: + phpts: ${{ matrix.ts == 'zts' && 'ts' || 'nts' }} with: php-version: ${{ env.PHP_MINOR }} extensions: ffi, opcache ini-values: ffi.enable=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=0, opcache.jit=off, opcache.jit_buffer_size=0 coverage: none + - name: Assert the thread-safety mode matches the matrix leg + run: | + php -r 'exit(ZEND_THREAD_SAFE === ("'"${{ matrix.ts }}"'" === "zts") ? 0 : 1);' \ + || { echo "::error::PHP thread-safety mode does not match the ${{ matrix.ts }} matrix leg"; exit 1; } + - name: Assert the opcache extension is available to the test runner run: | php -r 'exit(extension_loaded("Zend OPcache") ? 0 : 1);' \ @@ -50,7 +70,7 @@ jobs: # the child process, fixture not published from shared memory), so without # this step a broken opcache setup reads as a green run. - name: Opcache/SHM coverage must not silently skip - run: composer test:opcache + run: ${{ matrix.opcache_gate }} - name: Worker-loop soak (flat memory after warm-up) run: php -d ffi.enable=1 -d zend.assertions=1 -d opcache.jit=off tools/examples/worker-loop.php @@ -83,7 +103,7 @@ jobs: - run: composer cs:check tests-internal-debug: - name: Internal group (debug build) + name: Internal group (debug build, ${{ matrix.ts_label }}) runs-on: ubuntu-latest # The segfault-prone destructive tests run only against a --enable-debug # PHP build, where corruption surfaces as assertion failures. There is no @@ -91,6 +111,18 @@ jobs: # own source with a plain `docker build` (the daemon's built-in BuildKit - # no buildx setup, no moby/buildkit pull, fewer flaky Docker Hub round trips) # and run the tests in it. + strategy: + fail-fast: false + matrix: + include: + - ts: nts + ts_label: NTS + # ZTS excludes the relocator tests (no ZTS payload support yet, + # issue #118) but still gates the SHM coverage against silent skips + opcache_args: --group opcache --fail-on-skipped + - ts: zts + ts_label: ZTS + opcache_args: --group opcache --exclude-group opcache-relocator --fail-on-skipped steps: - uses: actions/checkout@v4 @@ -111,6 +143,7 @@ jobs: docker build \ -f tools/docker/php-debug.Dockerfile \ --build-arg "PHP_VERSION=${PHP_MINOR}" \ + --build-arg "PHP_TS=${{ matrix.ts }}" \ -t z-engine-php:debug . - name: Run internal group with process isolation @@ -125,7 +158,7 @@ jobs: - name: Run opcache/SHM group on the debug build run: | docker run --rm -v "$PWD:/app" -w /app z-engine-php:debug \ - vendor/bin/phpunit --group opcache --fail-on-skipped + vendor/bin/phpunit ${{ matrix.opcache_args }} header-drift: name: Generated headers up to date diff --git a/tools/docker/php-debug.Dockerfile b/tools/docker/php-debug.Dockerfile index 631e185..bab977e 100644 --- a/tools/docker/php-debug.Dockerfile +++ b/tools/docker/php-debug.Dockerfile @@ -14,6 +14,11 @@ ARG PHP_VERSION=8.4 FROM php:${PHP_VERSION}-cli AS build +# Thread-safety mode: "nts" (default) or "zts". The base tag stays -cli either +# way - PHP is rebuilt from the bundled source tarball below, which is identical +# across the -cli/-zts image variants; only the configure flag differs. +ARG PHP_TS=nts + # Build dependencies for the default-enabled extensions (which the official # image's runtime layer strips the -dev libs for): FFI, libxml-based extensions # (dom/xml/xmlwriter/simplexml), mbstring (oniguruma) and sqlite3/pdo_sqlite. @@ -35,6 +40,7 @@ RUN set -eux; \ cd /usr/src/php; \ ./configure \ --enable-debug \ + $(test "$PHP_TS" = "zts" && echo --enable-zts) \ --with-ffi \ --enable-mbstring \ --enable-opcache \ @@ -77,12 +83,15 @@ RUN set -eux; \ echo 'opcache.jit=off'; \ } > /usr/local/etc/php/conf.d/z-engine.ini -# Sanity check: the interpreter's own banner must report a DEBUG build and FFI -# must be present (built in). (PHP_DEBUG's constant type is not worth asserting -# strictly - the banner is the ground truth PHP prints for itself.) A missing -# opcache is reported with the state that explains it, since the whole -# shared-memory test group depends on the extension being loaded. -RUN php -v && php -v | grep -q 'DEBUG' && php -m | grep -qi '^FFI$' \ +# Sanity check: the interpreter's own banner must report a DEBUG build, the +# requested thread-safety mode, and FFI must be present (built in). (PHP_DEBUG's +# constant type is not worth asserting strictly - the banner is the ground truth +# PHP prints for itself.) A missing opcache is reported with the state that +# explains it, since the whole shared-memory test group depends on the extension +# being loaded. +RUN php -v && php -v | grep -q 'DEBUG' \ + && EXPECTED_TS="$PHP_TS" php -r 'exit(ZEND_THREAD_SAFE === (getenv("EXPECTED_TS") === "zts") ? 0 : 1);' \ + && php -m | grep -qi '^FFI$' \ && { php -r 'exit(extension_loaded("Zend OPcache") ? 0 : 1);' \ || { echo "Zend OPcache did not load:"; \ php --ini; \ From 63f08b8bc428c55aa6bb7c3e628524ad503d3229 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 19:35:45 +0000 Subject: [PATCH 07/10] docs: ZTS support matrix and regeneration notes Part of #60 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019mWPLkDoKWoDDS9W9LSaDa --- AGENTS.md | 19 +++++++++++++++++-- README.md | 6 +++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 03f1dc8..6f6a4d5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -50,7 +50,11 @@ Everything under `include//--/` is generated: | `layouts.json` | `sizeof`/`offsetof` of every dereferenced struct, from the C compiler | | `probe.c` | the generated C probe (kept so a probe-only run can reuse it) | -Regenerate them with: +This branch maintains **two thread-safety targets**: `linux-x64-nts` and +`linux-x64-zts` (the manifest in `tools/generator/symbols.php` is +thread-safety-aware — on ZTS the per-thread EG/CG are reached through the TSRM +offsets instead of the plain extern symbols, see issue #60). Regenerate them +with: ```bash composer gen-headers # all targets for this branch (needs Docker) @@ -82,12 +86,19 @@ structs (`Zend/zend_closures.c`, `ext/opcache/ZendAccelerator.h`, PHP version, ext-ffi. Fetch the matching `Zend/zend_closures.c`, `ext/opcache/ZendAccelerator.h` and `ext/opcache/zend_file_cache.c` (and nothing else) from `raw.githubusercontent.com/php/php-src/php-/`. + For the `zts` target the running PHP must itself be a matching + `--enable-zts` **release** build of the same minor (emit.php derives the + thread-safety mode, the TSRM symbols and the layouts from the interpreter + it runs under). 2. First run against the **committed** `symbols.php` into a scratch directory and `diff` against `include///` — the output must be byte-identical (it was, verified on Ubuntu clang-18 vs the trixie image: the emitter normalizes declarations from the clang AST, so compiler version does not leak into the artifacts). If the diff is clean, host - regeneration is equivalent to the Docker/CI pipeline for this host. + regeneration is equivalent to the Docker/CI pipeline for this host. An + NTS pre-check validates the host pipeline for the ZTS target too — the + emitter and probe code paths are identical, only the manifest branch + differs. 3. Only then apply the `symbols.php` change and regenerate into `include/` for real: `php -d memory_limit=2G tools/generator/emit.php --php-src= [--out=...]`. @@ -115,6 +126,10 @@ composer test:internal # destructive/segfault-prone group, process-isolated - `ZENGINE_STRICT_LAYOUT_CHECK=1` (set in the test bootstrap) makes `Core::init()` verify every struct layout against `layouts.json` before touching engine memory — the anti-segfault airbag. Keep it on in development. +- On **ZTS** builds the file-cache relocator tests (`opcache-relocator` group) + self-skip — ZTS payloads are not supported yet (issue #118). The non-skip + gate for the remaining opcache/SHM coverage is `composer test:opcache-zts`; + CI runs both release and debug test legs on NTS **and** ZTS. ## Quality gates (all enforced in CI) diff --git a/README.md b/README.md index 992b75c..cf0f090 100644 --- a/README.md +++ b/README.md @@ -38,16 +38,16 @@ FFI lets PHP load shared libraries, call C functions, and read C structures with ## Requirements & support matrix - PHP with the **FFI** extension enabled -- **x64, non-thread-safe (NTS)** builds +- **x64** builds, **NTS and ZTS** (on ZTS the opcache file-cache relocator is not yet supported — [#118](https://github.com/lisachenko/z-engine/issues/118)) Engine memory layouts change between every PHP minor version, so each PHP minor has its own generated definitions and its own branch. | PHP | OS / Arch / TS | Branch | Status | |-----|----------------|--------|--------| | 8.5 | linux-x64-nts | `master` | 🚧 in progress | -| 8.4 | linux-x64-nts | `8.4` | ✅ supported | +| 8.4 | linux-x64-nts, linux-x64-zts | `8.4` | ✅ supported | | 8.0 | linux-x64-nts | `8.0` | 🧊 frozen (legacy) | -| macOS / Windows / ZTS | — | — | 📋 [tracked in issues](https://github.com/lisachenko/z-engine/issues) | +| macOS / Windows | — | — | 📋 [tracked in issues](https://github.com/lisachenko/z-engine/issues) | > **Version matching is not optional.** Running Z-Engine against a PHP minor it was not built for corrupts memory. `Core::init()` enforces the match and aborts with a clear message rather than letting you crash. From 689ab8d534d0f2e313897849a7b16bc047425f30 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 20:10:15 +0000 Subject: [PATCH 08/10] ci: cache the docker image layers with actions/cache The debug-build jobs recompile PHP from source on every run and the header-drift job rebuilds the generator toolchain image; both now build through buildx with a local layer cache wrapped in actions/cache. The debug job rotates the cache directory to keep it bounded; generate.php gains an opt-in Z_ENGINE_BUILDX_CACHE_DIR passthrough with per-target subdirectories and the same rotation, so the emit stage still re-runs (it produces the artifacts under drift check) while the apt/clang/ffi layers restore from cache. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019mWPLkDoKWoDDS9W9LSaDa --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++---- tools/generator/generate.php | 24 ++++++++++++++++++++- 2 files changed, 61 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fcd2244..3d9934f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,9 +108,9 @@ jobs: # The segfault-prone destructive tests run only against a --enable-debug # PHP build, where corruption surfaces as assertion failures. There is no # official debug PHP image, so we build one here from the official image's - # own source with a plain `docker build` (the daemon's built-in BuildKit - - # no buildx setup, no moby/buildkit pull, fewer flaky Docker Hub round trips) - # and run the tests in it. + # own source (a full PHP compile) and run the tests in it. The build goes + # through buildx so its layers can be cached across runs with actions/cache + # - a warm cache turns the multi-minute compile into a layer restore. strategy: fail-fast: false matrix: @@ -138,14 +138,36 @@ jobs: - name: Install dependencies uses: ramsey/composer-install@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Restore the debug image layer cache + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: docker-debug-${{ matrix.ts }}-${{ env.PHP_MINOR }}-${{ hashFiles('tools/docker/php-debug.Dockerfile') }} + restore-keys: | + docker-debug-${{ matrix.ts }}-${{ env.PHP_MINOR }}- + - name: Build the debug PHP image run: | - docker build \ + mkdir -p /tmp/.buildx-cache + docker buildx build \ -f tools/docker/php-debug.Dockerfile \ --build-arg "PHP_VERSION=${PHP_MINOR}" \ --build-arg "PHP_TS=${{ matrix.ts }}" \ + --cache-from "type=local,src=/tmp/.buildx-cache" \ + --cache-to "type=local,dest=/tmp/.buildx-cache-new,mode=max" \ + --load \ -t z-engine-php:debug . + # Rotate instead of appending: a reused local cache dir accumulates stale + # layers without bound, so each run saves only the layers it actually used + - name: Rotate the layer cache + run: | + rm -rf /tmp/.buildx-cache + mv /tmp/.buildx-cache-new /tmp/.buildx-cache + - name: Run internal group with process isolation run: | docker run --rm -v "$PWD:/app" -w /app z-engine-php:debug \ @@ -167,8 +189,20 @@ jobs: - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + # Caches the generator image's toolchain layers (apt/clang/ext-ffi); the + # emit stage itself always re-runs - it is the step that produces the + # artifacts being drift-checked. generate.php rotates per-target subdirs. + - name: Restore the generator image layer cache + uses: actions/cache@v4 + with: + path: /tmp/.buildx-gen-cache + key: docker-gen-${{ env.PHP_MINOR }}-${{ hashFiles('tools/generator/Dockerfile') }} + restore-keys: | + docker-gen-${{ env.PHP_MINOR }}- - name: Regenerate engine definitions run: composer gen-headers + env: + Z_ENGINE_BUILDX_CACHE_DIR: /tmp/.buildx-gen-cache - name: Fail if the committed artifacts are stale run: | if ! git diff --exit-code -- include/; then diff --git a/tools/generator/generate.php b/tools/generator/generate.php index 29e27b5..8cc626c 100644 --- a/tools/generator/generate.php +++ b/tools/generator/generate.php @@ -78,13 +78,31 @@ $caBundleCopied = true; } +// Optional buildx layer-cache directory (e.g. wrapped in actions/cache by CI): +// per-target subdirectories, rotated after each successful build so the local +// cache never accumulates stale layers across runs. +$layerCacheDir = getenv('Z_ENGINE_BUILDX_CACHE_DIR'); +$layerCacheDir = is_string($layerCacheDir) && $layerCacheDir !== '' ? rtrim($layerCacheDir, '/') : ''; + $failures = 0; foreach ($targets as $target) { $baseImage = $mirror . ($target['ts'] === 'zts' ? "php:{$target['php']}-zts" : "php:{$target['php']}-cli"); $outputDir = "{$repositoryRoot}/include/{$target['php']}/linux-{$arch}-{$target['ts']}"; - $command = 'docker buildx build --progress=plain' + + $cacheArguments = ''; + $targetCacheDir = ''; + if ($layerCacheDir !== '') { + $targetCacheDir = "{$layerCacheDir}/{$target['php']}-{$target['ts']}"; + if (is_dir($targetCacheDir)) { + $cacheArguments .= ' --cache-from ' . escapeshellarg("type=local,src={$targetCacheDir}"); + } + $cacheArguments .= ' --cache-to ' . escapeshellarg("type=local,dest={$targetCacheDir}-new,mode=max"); + } + + $command = 'docker buildx build --progress=plain' . ' --build-arg ' . escapeshellarg("BASE_IMAGE={$baseImage}") . $proxyArguments + . $cacheArguments . ' --output ' . escapeshellarg("type=local,dest={$outputDir}") . ' ' . escapeshellarg($repositoryRoot . '/tools/generator'); @@ -95,6 +113,10 @@ $failures++; continue; } + if ($targetCacheDir !== '' && is_dir("{$targetCacheDir}-new")) { + passthru('rm -rf ' . escapeshellarg($targetCacheDir)); + passthru('mv ' . escapeshellarg("{$targetCacheDir}-new") . ' ' . escapeshellarg($targetCacheDir)); + } echo "==> OK: {$outputDir}\n"; } From 896867f1d9ed66a5163e6366e2985e1f191d8df6 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 20:16:54 +0000 Subject: [PATCH 09/10] style(gen): drop stray alignment spaces in the cache-argument seeds Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019mWPLkDoKWoDDS9W9LSaDa --- tools/generator/generate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/generator/generate.php b/tools/generator/generate.php index 8cc626c..5c1746b 100644 --- a/tools/generator/generate.php +++ b/tools/generator/generate.php @@ -89,8 +89,8 @@ $baseImage = $mirror . ($target['ts'] === 'zts' ? "php:{$target['php']}-zts" : "php:{$target['php']}-cli"); $outputDir = "{$repositoryRoot}/include/{$target['php']}/linux-{$arch}-{$target['ts']}"; - $cacheArguments = ''; - $targetCacheDir = ''; + $cacheArguments = ''; + $targetCacheDir = ''; if ($layerCacheDir !== '') { $targetCacheDir = "{$layerCacheDir}/{$target['php']}-{$target['ts']}"; if (is_dir($targetCacheDir)) { From f6111b3dbeeb5a4518a240497cca27d58a47161a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 20:17:24 +0000 Subject: [PATCH 10/10] chore(gen): add generated PHP 8.5 linux-x64-zts engine definitions Generated with the documented Docker-free host pipeline under a release --enable-zts build of PHP 8.5.9, after the byte-identity pre-check reproduced master's committed 8.5 NTS artifacts exactly with the merged thread-safety-aware manifest. The emit pipeline's FFI validation stage verified all 40 struct layouts against the C compiler under the ZTS interpreter; CI's header-drift job re-derives both 8.5 targets in Docker and diffs against these files. Completes the master side of #60 (see PR #143 / #144) Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_019mWPLkDoKWoDDS9W9LSaDa --- include/8.5/linux-x64-zts/constants.php | 525 ++++++++ include/8.5/linux-x64-zts/engine.h | 1183 +++++++++++++++++ include/8.5/linux-x64-zts/layouts.json | 697 ++++++++++ include/8.5/linux-x64-zts/probe.c | 1540 +++++++++++++++++++++++ 4 files changed, 3945 insertions(+) create mode 100644 include/8.5/linux-x64-zts/constants.php create mode 100644 include/8.5/linux-x64-zts/engine.h create mode 100644 include/8.5/linux-x64-zts/layouts.json create mode 100644 include/8.5/linux-x64-zts/probe.c diff --git a/include/8.5/linux-x64-zts/constants.php b/include/8.5/linux-x64-zts/constants.php new file mode 100644 index 0000000..102a95e --- /dev/null +++ b/include/8.5/linux-x64-zts/constants.php @@ -0,0 +1,525 @@ + 1, + 'ZEND_ACC_PROTECTED' => 2, + 'ZEND_ACC_PRIVATE' => 4, + 'ZEND_ACC_CHANGED' => 8, + 'ZEND_ACC_STATIC' => 16, + 'ZEND_ACC_ABSTRACT' => 64, + 'ZEND_ACC_FINAL' => 32, + 'ZEND_ACC_DEPRECATED' => 2048, + 'ZEND_ACC_INTERFACE' => 1, + 'ZEND_ACC_TRAIT' => 2, + 'ZEND_ACC_ANON_CLASS' => 4, + 'ZEND_ACC_ENUM' => 268435456, + 'ZEND_ACC_IMPLICIT_ABSTRACT_CLASS' => 16, + 'ZEND_ACC_LINKED' => 8, + 'ZEND_ACC_IMMUTABLE' => 128, + 'ZEND_ACC_USE_GUARDS' => 1073741824, + 'ZEND_ACC_CONSTANTS_UPDATED' => 4096, + 'ZEND_ACC_NO_DYNAMIC_PROPERTIES' => 8192, + 'ZEND_HAS_STATIC_IN_METHODS' => 16384, + 'ZEND_ACC_TOP_LEVEL' => 512, + 'ZEND_ACC_PRELOADED' => 1024, + 'ZEND_ACC_NOT_SERIALIZABLE' => 536870912, + 'ZEND_ACC_READONLY_CLASS' => 65536, + 'ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES' => 32768, + 'ZEND_ACC_UNRESOLVED_VARIANCE' => 524288, + 'ZEND_ACC_NEARLY_LINKED' => 1048576, + 'ZEND_ACC_RESOLVED_PARENT' => 131072, + 'ZEND_ACC_RESOLVED_INTERFACES' => 262144, + 'ZEND_ACC_EXPLICIT_ABSTRACT_CLASS' => 64, + 'ZEND_ACC_READONLY' => 128, + 'ZEND_ACC_VIRTUAL' => 512, + 'ZEND_ACC_FAKE_CLOSURE' => 8388608, + 'ZEND_ACC_UNINSTANTIABLE' => 268435539, + 'ZEND_ACC_CALL_VIA_TRAMPOLINE' => 262144, + 'ZEND_ACC_NEVER_CACHE' => 524288, + 'ZEND_ACC_TRAIT_CLONE' => 1048576, + 'ZEND_ACC_RETURN_REFERENCE' => 4096, + 'ZEND_ACC_DONE_PASS_TWO' => 33554432, + 'ZEND_ACC_HEAP_RT_CACHE' => 67108864, + 'ZEND_ACC_STRICT_TYPES' => 2147483648, + 'ZEND_ACC_CLOSURE' => 4194304, + 'ZEND_ACC_GENERATOR' => 16777216, + 'ZEND_ACC_HAS_FINALLY_BLOCK' => 32768, + 'ZEND_ACC_EARLY_BINDING' => 65536, + 'ZEND_ACC_USES_THIS' => 131072, + 'ZEND_ACC_CTOR' => 2097152, + 'ZEND_ACC_HAS_TYPE_HINTS' => 256, + 'ZEND_ACC_HAS_RETURN_TYPE' => 8192, + 'ZEND_ACC_VARIADIC' => 16384, + 'ZEND_ACC_CACHED' => 4194304, + 'ZEND_ACC_FILE_CACHED' => 134217728, + 'ZEND_ACC_ARENA_ALLOCATED' => 33554432, + '_ZEND_TYPE_EXTRA_FLAGS_SHIFT' => 25, + '_ZEND_TYPE_MASK' => 33554431, + '_ZEND_TYPE_NAME_BIT' => 16777216, + '_ZEND_TYPE_LITERAL_NAME_BIT' => 8388608, + '_ZEND_TYPE_LIST_BIT' => 4194304, + '_ZEND_TYPE_KIND_MASK' => 29360128, + '_ZEND_TYPE_ITERABLE_BIT' => 2097152, + '_ZEND_TYPE_ARENA_BIT' => 1048576, + '_ZEND_TYPE_INTERSECTION_BIT' => 524288, + '_ZEND_TYPE_UNION_BIT' => 262144, + '_ZEND_TYPE_NULLABLE_BIT' => 2, + '_ZEND_TYPE_MAY_BE_MASK' => 262143, + 'IS_UNDEF' => 0, + 'IS_NULL' => 1, + 'IS_FALSE' => 2, + 'IS_TRUE' => 3, + 'IS_LONG' => 4, + 'IS_DOUBLE' => 5, + 'IS_STRING' => 6, + 'IS_ARRAY' => 7, + 'IS_OBJECT' => 8, + 'IS_RESOURCE' => 9, + 'IS_REFERENCE' => 10, + 'IS_CONSTANT_AST' => 11, + 'IS_CALLABLE' => 12, + 'IS_ITERABLE' => 13, + 'IS_VOID' => 14, + 'IS_STATIC' => 15, + 'IS_MIXED' => 16, + 'IS_NEVER' => 17, + 'IS_INDIRECT' => 12, + 'IS_PTR' => 13, + 'IS_ALIAS_PTR' => 14, + '_IS_ERROR' => 15, + '_IS_BOOL' => 18, + '_IS_NUMBER' => 19, + 'IS_TYPE_REFCOUNTED' => 1, + 'IS_TYPE_COLLECTABLE' => 2, + 'Z_TYPE_MASK' => 255, + 'Z_TYPE_FLAGS_MASK' => 65280, + 'Z_TYPE_FLAGS_SHIFT' => 8, + 'GC_TYPE_MASK' => 15, + 'GC_FLAGS_MASK' => 1008, + 'GC_INFO_MASK' => 4294966272, + 'GC_FLAGS_SHIFT' => 0, + 'GC_INFO_SHIFT' => 10, + 'GC_NULL' => 17, + 'GC_STRING' => 22, + 'GC_ARRAY' => 7, + 'GC_OBJECT' => 8, + 'GC_RESOURCE' => 25, + 'GC_REFERENCE' => 26, + 'GC_CONSTANT_AST' => 27, + 'GC_NOT_COLLECTABLE' => 16, + 'GC_PROTECTED' => 32, + 'GC_IMMUTABLE' => 64, + 'GC_PERSISTENT' => 128, + 'GC_PERSISTENT_LOCAL' => 256, + 'IS_STR_CLASS_NAME_MAP_PTR' => 32, + 'IS_STR_INTERNED' => 64, + 'IS_STR_PERSISTENT' => 128, + 'IS_STR_PERMANENT' => 256, + 'IS_STR_VALID_UTF8' => 512, + 'IS_ARRAY_IMMUTABLE' => 64, + 'IS_ARRAY_PERSISTENT' => 128, + 'IS_OBJ_WEAKLY_REFERENCED' => 128, + 'IS_OBJ_DESTRUCTOR_CALLED' => 256, + 'IS_OBJ_FREE_CALLED' => 512, + 'IS_OBJ_LAZY_UNINITIALIZED' => 2147483648, + 'IS_OBJ_LAZY_PROXY' => 1073741824, + 'HASH_FLAG_CONSISTENCY' => 3, + 'HASH_FLAG_PACKED' => 4, + 'HASH_FLAG_UNINITIALIZED' => 8, + 'HASH_FLAG_STATIC_KEYS' => 16, + 'HASH_FLAG_HAS_EMPTY_IND' => 32, + 'HASH_FLAG_ALLOW_COW_VIOLATION' => 64, + 'HASH_UPDATE' => 1, + 'HASH_ADD' => 2, + 'HASH_UPDATE_INDIRECT' => 4, + 'HASH_ADD_NEW' => 8, + 'HASH_ADD_NEXT' => 16, + 'HT_MIN_MASK' => 4294967294, + 'HT_MIN_SIZE' => 8, + 'ZEND_MODULE_API_NO' => 20250925, + 'MODULE_PERSISTENT' => 1, + 'MODULE_TEMPORARY' => 2, + 'CONST_CS' => 0, + 'CONST_PERSISTENT' => 1, + 'CONST_NO_FILE_CACHE' => 2, + 'CONST_DEPRECATED' => 4, + 'CONST_OWNED' => 8, + 'CONST_RECURSIVE' => 16, + 'PHP_USER_CONSTANT' => 8388607, + 'ZEND_DEBUG' => 0, + 'ZEND_MM_ALIGNMENT' => 8, + 'ZEND_MAX_RESERVED_RESOURCES' => 6, + 'ZEND_INTERNAL_FUNCTION' => 1, + 'ZEND_USER_FUNCTION' => 2, + 'ZEND_EVAL_CODE' => 4, + 'ZEND_COMPILE_EXTENDED_STMT' => 1, + 'ZEND_COMPILE_EXTENDED_FCALL' => 2, + 'ZEND_COMPILE_EXTENDED_INFO' => 3, + 'ZEND_COMPILE_HANDLE_OP_ARRAY' => 4, + 'ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS' => 8, + 'ZEND_COMPILE_DELAYED_BINDING' => 32, + 'ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION' => 64, + 'ZEND_COMPILE_IGNORE_INTERNAL_CLASSES' => 16, + 'ZEND_COMPILE_IGNORE_USER_FUNCTIONS' => 512, + 'ZEND_COMPILE_GUARDS' => 1024, + 'ZEND_COMPILE_NO_BUILTINS' => 2048, + 'ZEND_COMPILE_NO_JUMPTABLES' => 65536, + 'ZEND_COMPILE_PRELOAD' => 32768, + 'ZEND_COMPILE_PRELOAD_IN_CHILD' => 131072, + 'ZEND_COMPILE_WITHOUT_EXECUTION' => 16384, + 'ZEND_CALL_FUNCTION' => 0, + 'ZEND_CALL_CODE' => 65536, + 'ZEND_CALL_NESTED' => 0, + 'ZEND_CALL_TOP' => 131072, + 'ZEND_CALL_HAS_THIS' => 776, + 'ZEND_CALL_FAKE_CLOSURE' => 8388608, + 'ZEND_CALL_CLOSURE' => 4194304, + 'ZEND_CALL_HAS_SYMBOL_TABLE' => 1048576, + 'ZEND_ATTRIBUTE_TARGET_CLASS' => 1, + 'ZEND_ATTRIBUTE_TARGET_FUNCTION' => 2, + 'ZEND_ATTRIBUTE_TARGET_METHOD' => 4, + 'ZEND_ATTRIBUTE_TARGET_PROPERTY' => 8, + 'ZEND_ATTRIBUTE_TARGET_CLASS_CONST' => 16, + 'ZEND_ATTRIBUTE_TARGET_PARAMETER' => 32, + 'ZEND_ATTRIBUTE_TARGET_CONST' => 64, + 'ZEND_ATTRIBUTE_TARGET_ALL' => 127, + 'ZEND_ATTRIBUTE_IS_REPEATABLE' => 128, + 'ZEND_ATTRIBUTE_FLAGS' => 255, + 'ZEND_AST_ZVAL' => 64, + 'ZEND_AST_CONSTANT' => 65, + 'ZEND_AST_OP_ARRAY' => 66, + 'ZEND_AST_ZNODE' => 67, + 'ZEND_AST_FUNC_DECL' => 68, + 'ZEND_AST_CLOSURE' => 69, + 'ZEND_AST_METHOD' => 70, + 'ZEND_AST_CLASS' => 71, + 'ZEND_AST_ARROW_FUNC' => 72, + 'ZEND_AST_PROPERTY_HOOK' => 73, + 'ZEND_AST_ARG_LIST' => 128, + 'ZEND_AST_ARRAY' => 129, + 'ZEND_AST_ENCAPS_LIST' => 130, + 'ZEND_AST_EXPR_LIST' => 131, + 'ZEND_AST_STMT_LIST' => 132, + 'ZEND_AST_IF' => 133, + 'ZEND_AST_SWITCH_LIST' => 134, + 'ZEND_AST_CATCH_LIST' => 135, + 'ZEND_AST_PARAM_LIST' => 136, + 'ZEND_AST_CLOSURE_USES' => 137, + 'ZEND_AST_PROP_DECL' => 138, + 'ZEND_AST_CONST_DECL' => 139, + 'ZEND_AST_CLASS_CONST_DECL' => 140, + 'ZEND_AST_NAME_LIST' => 141, + 'ZEND_AST_TRAIT_ADAPTATIONS' => 142, + 'ZEND_AST_USE' => 143, + 'ZEND_AST_TYPE_UNION' => 144, + 'ZEND_AST_TYPE_INTERSECTION' => 145, + 'ZEND_AST_ATTRIBUTE_LIST' => 146, + 'ZEND_AST_ATTRIBUTE_GROUP' => 147, + 'ZEND_AST_MATCH_ARM_LIST' => 148, + 'ZEND_AST_MODIFIER_LIST' => 149, + 'ZEND_AST_MAGIC_CONST' => 0, + 'ZEND_AST_TYPE' => 1, + 'ZEND_AST_CONSTANT_CLASS' => 2, + 'ZEND_AST_CALLABLE_CONVERT' => 3, + 'ZEND_AST_VAR' => 256, + 'ZEND_AST_CONST' => 257, + 'ZEND_AST_UNPACK' => 258, + 'ZEND_AST_UNARY_PLUS' => 259, + 'ZEND_AST_UNARY_MINUS' => 260, + 'ZEND_AST_CAST' => 261, + 'ZEND_AST_CAST_VOID' => 262, + 'ZEND_AST_EMPTY' => 263, + 'ZEND_AST_ISSET' => 264, + 'ZEND_AST_SILENCE' => 265, + 'ZEND_AST_SHELL_EXEC' => 266, + 'ZEND_AST_PRINT' => 267, + 'ZEND_AST_INCLUDE_OR_EVAL' => 268, + 'ZEND_AST_UNARY_OP' => 269, + 'ZEND_AST_PRE_INC' => 270, + 'ZEND_AST_PRE_DEC' => 271, + 'ZEND_AST_POST_INC' => 272, + 'ZEND_AST_POST_DEC' => 273, + 'ZEND_AST_YIELD_FROM' => 274, + 'ZEND_AST_CLASS_NAME' => 275, + 'ZEND_AST_GLOBAL' => 276, + 'ZEND_AST_UNSET' => 277, + 'ZEND_AST_RETURN' => 278, + 'ZEND_AST_LABEL' => 279, + 'ZEND_AST_REF' => 280, + 'ZEND_AST_HALT_COMPILER' => 281, + 'ZEND_AST_ECHO' => 282, + 'ZEND_AST_THROW' => 283, + 'ZEND_AST_GOTO' => 284, + 'ZEND_AST_BREAK' => 285, + 'ZEND_AST_CONTINUE' => 286, + 'ZEND_AST_PROPERTY_HOOK_SHORT_BODY' => 287, + 'ZEND_AST_DIM' => 512, + 'ZEND_AST_PROP' => 513, + 'ZEND_AST_NULLSAFE_PROP' => 514, + 'ZEND_AST_STATIC_PROP' => 515, + 'ZEND_AST_CALL' => 516, + 'ZEND_AST_CLASS_CONST' => 517, + 'ZEND_AST_ASSIGN' => 518, + 'ZEND_AST_ASSIGN_REF' => 519, + 'ZEND_AST_ASSIGN_OP' => 520, + 'ZEND_AST_BINARY_OP' => 521, + 'ZEND_AST_GREATER' => 522, + 'ZEND_AST_GREATER_EQUAL' => 523, + 'ZEND_AST_AND' => 524, + 'ZEND_AST_OR' => 525, + 'ZEND_AST_ARRAY_ELEM' => 526, + 'ZEND_AST_NEW' => 527, + 'ZEND_AST_INSTANCEOF' => 528, + 'ZEND_AST_YIELD' => 529, + 'ZEND_AST_COALESCE' => 530, + 'ZEND_AST_ASSIGN_COALESCE' => 531, + 'ZEND_AST_STATIC' => 532, + 'ZEND_AST_WHILE' => 533, + 'ZEND_AST_DO_WHILE' => 534, + 'ZEND_AST_IF_ELEM' => 535, + 'ZEND_AST_SWITCH' => 536, + 'ZEND_AST_SWITCH_CASE' => 537, + 'ZEND_AST_DECLARE' => 538, + 'ZEND_AST_USE_TRAIT' => 539, + 'ZEND_AST_TRAIT_PRECEDENCE' => 540, + 'ZEND_AST_METHOD_REFERENCE' => 541, + 'ZEND_AST_NAMESPACE' => 542, + 'ZEND_AST_USE_ELEM' => 543, + 'ZEND_AST_TRAIT_ALIAS' => 544, + 'ZEND_AST_GROUP_USE' => 545, + 'ZEND_AST_ATTRIBUTE' => 546, + 'ZEND_AST_MATCH' => 547, + 'ZEND_AST_MATCH_ARM' => 548, + 'ZEND_AST_NAMED_ARG' => 549, + 'ZEND_AST_PARENT_PROPERTY_HOOK_CALL' => 550, + 'ZEND_AST_PIPE' => 551, + 'ZEND_AST_METHOD_CALL' => 768, + 'ZEND_AST_NULLSAFE_METHOD_CALL' => 769, + 'ZEND_AST_STATIC_CALL' => 770, + 'ZEND_AST_CONDITIONAL' => 771, + 'ZEND_AST_TRY' => 772, + 'ZEND_AST_CATCH' => 773, + 'ZEND_AST_PROP_GROUP' => 774, + 'ZEND_AST_CONST_ELEM' => 775, + 'ZEND_AST_CLASS_CONST_GROUP' => 776, + 'ZEND_AST_CONST_ENUM_INIT' => 777, + 'ZEND_AST_FOR' => 1024, + 'ZEND_AST_FOREACH' => 1025, + 'ZEND_AST_ENUM_CASE' => 1026, + 'ZEND_AST_PROP_ELEM' => 1027, + 'ZEND_AST_PARAM' => 1536, + 'ZEND_PROPERTY_HOOK_GET' => 0, + 'ZEND_PROPERTY_HOOK_SET' => 1, + 'ZEND_NOP' => 0, + 'ZEND_ADD' => 1, + 'ZEND_SUB' => 2, + 'ZEND_MUL' => 3, + 'ZEND_DIV' => 4, + 'ZEND_MOD' => 5, + 'ZEND_SL' => 6, + 'ZEND_SR' => 7, + 'ZEND_CONCAT' => 8, + 'ZEND_BW_OR' => 9, + 'ZEND_BW_AND' => 10, + 'ZEND_BW_XOR' => 11, + 'ZEND_POW' => 12, + 'ZEND_BW_NOT' => 13, + 'ZEND_BOOL_NOT' => 14, + 'ZEND_BOOL_XOR' => 15, + 'ZEND_IS_IDENTICAL' => 16, + 'ZEND_IS_NOT_IDENTICAL' => 17, + 'ZEND_IS_EQUAL' => 18, + 'ZEND_IS_NOT_EQUAL' => 19, + 'ZEND_IS_SMALLER' => 20, + 'ZEND_IS_SMALLER_OR_EQUAL' => 21, + 'ZEND_ASSIGN' => 22, + 'ZEND_ASSIGN_DIM' => 23, + 'ZEND_ASSIGN_OBJ' => 24, + 'ZEND_ASSIGN_STATIC_PROP' => 25, + 'ZEND_ASSIGN_OP' => 26, + 'ZEND_ASSIGN_DIM_OP' => 27, + 'ZEND_ASSIGN_OBJ_OP' => 28, + 'ZEND_ASSIGN_STATIC_PROP_OP' => 29, + 'ZEND_ASSIGN_REF' => 30, + 'ZEND_QM_ASSIGN' => 31, + 'ZEND_ASSIGN_OBJ_REF' => 32, + 'ZEND_ASSIGN_STATIC_PROP_REF' => 33, + 'ZEND_PRE_INC' => 34, + 'ZEND_PRE_DEC' => 35, + 'ZEND_POST_INC' => 36, + 'ZEND_POST_DEC' => 37, + 'ZEND_PRE_INC_STATIC_PROP' => 38, + 'ZEND_PRE_DEC_STATIC_PROP' => 39, + 'ZEND_POST_INC_STATIC_PROP' => 40, + 'ZEND_POST_DEC_STATIC_PROP' => 41, + 'ZEND_JMP' => 42, + 'ZEND_JMPZ' => 43, + 'ZEND_JMPNZ' => 44, + 'ZEND_JMPZ_EX' => 46, + 'ZEND_JMPNZ_EX' => 47, + 'ZEND_CASE' => 48, + 'ZEND_CHECK_VAR' => 49, + 'ZEND_SEND_VAR_NO_REF_EX' => 50, + 'ZEND_CAST' => 51, + 'ZEND_BOOL' => 52, + 'ZEND_FAST_CONCAT' => 53, + 'ZEND_ROPE_INIT' => 54, + 'ZEND_ROPE_ADD' => 55, + 'ZEND_ROPE_END' => 56, + 'ZEND_BEGIN_SILENCE' => 57, + 'ZEND_END_SILENCE' => 58, + 'ZEND_INIT_FCALL_BY_NAME' => 59, + 'ZEND_DO_FCALL' => 60, + 'ZEND_INIT_FCALL' => 61, + 'ZEND_RETURN' => 62, + 'ZEND_RECV' => 63, + 'ZEND_RECV_INIT' => 64, + 'ZEND_SEND_VAL' => 65, + 'ZEND_SEND_VAR_EX' => 66, + 'ZEND_SEND_REF' => 67, + 'ZEND_NEW' => 68, + 'ZEND_INIT_NS_FCALL_BY_NAME' => 69, + 'ZEND_FREE' => 70, + 'ZEND_INIT_ARRAY' => 71, + 'ZEND_ADD_ARRAY_ELEMENT' => 72, + 'ZEND_INCLUDE_OR_EVAL' => 73, + 'ZEND_UNSET_VAR' => 74, + 'ZEND_UNSET_DIM' => 75, + 'ZEND_UNSET_OBJ' => 76, + 'ZEND_FE_RESET_R' => 77, + 'ZEND_FE_FETCH_R' => 78, + 'ZEND_FETCH_R' => 80, + 'ZEND_FETCH_DIM_R' => 81, + 'ZEND_FETCH_OBJ_R' => 82, + 'ZEND_FETCH_W' => 83, + 'ZEND_FETCH_DIM_W' => 84, + 'ZEND_FETCH_OBJ_W' => 85, + 'ZEND_FETCH_RW' => 86, + 'ZEND_FETCH_DIM_RW' => 87, + 'ZEND_FETCH_OBJ_RW' => 88, + 'ZEND_FETCH_IS' => 89, + 'ZEND_FETCH_DIM_IS' => 90, + 'ZEND_FETCH_OBJ_IS' => 91, + 'ZEND_FETCH_FUNC_ARG' => 92, + 'ZEND_FETCH_DIM_FUNC_ARG' => 93, + 'ZEND_FETCH_OBJ_FUNC_ARG' => 94, + 'ZEND_FETCH_UNSET' => 95, + 'ZEND_FETCH_DIM_UNSET' => 96, + 'ZEND_FETCH_OBJ_UNSET' => 97, + 'ZEND_FETCH_LIST_R' => 98, + 'ZEND_FETCH_CONSTANT' => 99, + 'ZEND_CHECK_FUNC_ARG' => 100, + 'ZEND_EXT_STMT' => 101, + 'ZEND_EXT_FCALL_BEGIN' => 102, + 'ZEND_EXT_FCALL_END' => 103, + 'ZEND_EXT_NOP' => 104, + 'ZEND_TICKS' => 105, + 'ZEND_SEND_VAR_NO_REF' => 106, + 'ZEND_CATCH' => 107, + 'ZEND_THROW' => 108, + 'ZEND_FETCH_CLASS' => 109, + 'ZEND_CLONE' => 110, + 'ZEND_RETURN_BY_REF' => 111, + 'ZEND_INIT_METHOD_CALL' => 112, + 'ZEND_INIT_STATIC_METHOD_CALL' => 113, + 'ZEND_ISSET_ISEMPTY_VAR' => 114, + 'ZEND_ISSET_ISEMPTY_DIM_OBJ' => 115, + 'ZEND_SEND_VAL_EX' => 116, + 'ZEND_SEND_VAR' => 117, + 'ZEND_INIT_USER_CALL' => 118, + 'ZEND_SEND_ARRAY' => 119, + 'ZEND_SEND_USER' => 120, + 'ZEND_STRLEN' => 121, + 'ZEND_DEFINED' => 122, + 'ZEND_TYPE_CHECK' => 123, + 'ZEND_VERIFY_RETURN_TYPE' => 124, + 'ZEND_FE_RESET_RW' => 125, + 'ZEND_FE_FETCH_RW' => 126, + 'ZEND_FE_FREE' => 127, + 'ZEND_INIT_DYNAMIC_CALL' => 128, + 'ZEND_DO_ICALL' => 129, + 'ZEND_DO_UCALL' => 130, + 'ZEND_DO_FCALL_BY_NAME' => 131, + 'ZEND_PRE_INC_OBJ' => 132, + 'ZEND_PRE_DEC_OBJ' => 133, + 'ZEND_POST_INC_OBJ' => 134, + 'ZEND_POST_DEC_OBJ' => 135, + 'ZEND_ECHO' => 136, + 'ZEND_OP_DATA' => 137, + 'ZEND_INSTANCEOF' => 138, + 'ZEND_GENERATOR_CREATE' => 139, + 'ZEND_MAKE_REF' => 140, + 'ZEND_DECLARE_FUNCTION' => 141, + 'ZEND_DECLARE_LAMBDA_FUNCTION' => 142, + 'ZEND_DECLARE_CONST' => 143, + 'ZEND_DECLARE_CLASS' => 144, + 'ZEND_DECLARE_CLASS_DELAYED' => 145, + 'ZEND_DECLARE_ANON_CLASS' => 146, + 'ZEND_ADD_ARRAY_UNPACK' => 147, + 'ZEND_ISSET_ISEMPTY_PROP_OBJ' => 148, + 'ZEND_HANDLE_EXCEPTION' => 149, + 'ZEND_USER_OPCODE' => 150, + 'ZEND_ASSERT_CHECK' => 151, + 'ZEND_JMP_SET' => 152, + 'ZEND_UNSET_CV' => 153, + 'ZEND_ISSET_ISEMPTY_CV' => 154, + 'ZEND_FETCH_LIST_W' => 155, + 'ZEND_SEPARATE' => 156, + 'ZEND_FETCH_CLASS_NAME' => 157, + 'ZEND_CALL_TRAMPOLINE' => 158, + 'ZEND_DISCARD_EXCEPTION' => 159, + 'ZEND_YIELD' => 160, + 'ZEND_GENERATOR_RETURN' => 161, + 'ZEND_FAST_CALL' => 162, + 'ZEND_FAST_RET' => 163, + 'ZEND_RECV_VARIADIC' => 164, + 'ZEND_SEND_UNPACK' => 165, + 'ZEND_YIELD_FROM' => 166, + 'ZEND_COPY_TMP' => 167, + 'ZEND_BIND_GLOBAL' => 168, + 'ZEND_COALESCE' => 169, + 'ZEND_SPACESHIP' => 170, + 'ZEND_FUNC_NUM_ARGS' => 171, + 'ZEND_FUNC_GET_ARGS' => 172, + 'ZEND_FETCH_STATIC_PROP_R' => 173, + 'ZEND_FETCH_STATIC_PROP_W' => 174, + 'ZEND_FETCH_STATIC_PROP_RW' => 175, + 'ZEND_FETCH_STATIC_PROP_IS' => 176, + 'ZEND_FETCH_STATIC_PROP_FUNC_ARG' => 177, + 'ZEND_FETCH_STATIC_PROP_UNSET' => 178, + 'ZEND_UNSET_STATIC_PROP' => 179, + 'ZEND_ISSET_ISEMPTY_STATIC_PROP' => 180, + 'ZEND_FETCH_CLASS_CONSTANT' => 181, + 'ZEND_BIND_LEXICAL' => 182, + 'ZEND_BIND_STATIC' => 183, + 'ZEND_FETCH_THIS' => 184, + 'ZEND_SEND_FUNC_ARG' => 185, + 'ZEND_ISSET_ISEMPTY_THIS' => 186, + 'ZEND_SWITCH_LONG' => 187, + 'ZEND_SWITCH_STRING' => 188, + 'ZEND_IN_ARRAY' => 189, + 'ZEND_COUNT' => 190, + 'ZEND_GET_CLASS' => 191, + 'ZEND_GET_CALLED_CLASS' => 192, + 'ZEND_GET_TYPE' => 193, + 'ZEND_ARRAY_KEY_EXISTS' => 194, + 'ZEND_MATCH' => 195, + 'ZEND_CASE_STRICT' => 196, + 'ZEND_MATCH_ERROR' => 197, + 'ZEND_JMP_NULL' => 198, + 'ZEND_CHECK_UNDEF_ARGS' => 199, + 'ZEND_FETCH_GLOBALS' => 200, + 'ZEND_VERIFY_NEVER_TYPE' => 201, + 'ZEND_CALLABLE_CONVERT' => 202, + 'ZEND_BIND_INIT_STATIC_OR_JMP' => 203, + 'ZEND_FRAMELESS_ICALL_0' => 204, + 'ZEND_FRAMELESS_ICALL_1' => 205, + 'ZEND_FRAMELESS_ICALL_2' => 206, + 'ZEND_FRAMELESS_ICALL_3' => 207, + 'ZEND_JMP_FRAMELESS' => 208, + 'ZEND_INIT_PARENT_PROPERTY_HOOK_CALL' => 209, + 'ZEND_DECLARE_ATTRIBUTED_CONST' => 210, + 'ZEND_VM_LAST_OPCODE' => 210, +]; diff --git a/include/8.5/linux-x64-zts/engine.h b/include/8.5/linux-x64-zts/engine.h new file mode 100644 index 0000000..820f205 --- /dev/null +++ b/include/8.5/linux-x64-zts/engine.h @@ -0,0 +1,1183 @@ +#define FFI_SCOPE "ZEngine" +/* + * Generated by tools/generator for PHP 8.5 (linux-x64-zts, release) - DO NOT EDIT. + * Regenerate with `composer gen-headers`. + */ +typedef unsigned int __uint32_t; +typedef unsigned int __uid_t; +typedef int __pid_t; +typedef long int __clock_t; +typedef long int __time_t; +typedef void * __timer_t; +typedef __pid_t pid_t; +typedef __time_t time_t; +typedef __timer_t timer_t; +typedef struct +{ + unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; +} __sigset_t; +typedef long int __jmp_buf[8]; +struct __jmp_buf_tag + { + __jmp_buf __jmpbuf; + int __mask_was_saved; + __sigset_t __saved_mask; + }; +typedef int ts_rsrc_id; +union sigval +{ + int sival_int; + void *sival_ptr; +}; +typedef union sigval __sigval_t; +typedef struct + { + int si_signo; + int si_errno; + int si_code; + int __pad0; + union + { + int _pad[((128 / sizeof (int)) - 4)]; + struct + { + __pid_t si_pid; + __uid_t si_uid; + } _kill; + struct + { + int si_tid; + int si_overrun; + __sigval_t si_sigval; + } _timer; + struct + { + __pid_t si_pid; + __uid_t si_uid; + __sigval_t si_sigval; + } _rt; + struct + { + __pid_t si_pid; + __uid_t si_uid; + int si_status; + __clock_t si_utime; + __clock_t si_stime; + } _sigchld; + struct + { + void *si_addr; + short int si_addr_lsb; + union + { + struct + { + void *_lower; + void *_upper; + } _addr_bnd; + __uint32_t _pkey; + } _bounds; + } _sigfault; + struct + { + long int si_band; + int si_fd; + } _sigpoll; + struct + { + void *_call_addr; + int _syscall; + unsigned int _arch; + } _sigsys; + } _sifields; + } siginfo_t; +typedef void (*__sighandler_t) (int); +struct sigaction + { + union + { + __sighandler_t sa_handler; + void (*sa_sigaction) (int, siginfo_t *, void *); + } + __sigaction_handler; + __sigset_t sa_mask; + int sa_flags; + void (*sa_restorer) (void); + }; +struct _IO_FILE; +typedef struct _IO_FILE FILE; +typedef int64_t zend_long; +typedef uint64_t zend_ulong; +typedef enum { + SUCCESS = 0, + FAILURE = -1, +} ZEND_RESULT_CODE; +typedef ZEND_RESULT_CODE zend_result; +typedef struct _zend_object_handlers zend_object_handlers; +typedef struct _zend_class_entry zend_class_entry; +typedef union _zend_function zend_function; +typedef struct _zend_execute_data zend_execute_data; +typedef struct _zval_struct zval; +typedef struct _zend_refcounted zend_refcounted; +typedef struct _zend_string zend_string; +typedef struct _zend_array zend_array; +typedef struct _zend_object zend_object; +typedef struct _zend_resource zend_resource; +typedef struct _zend_reference zend_reference; +typedef struct _zend_ast_ref zend_ast_ref; +typedef struct _zend_ast zend_ast; +typedef void (*dtor_func_t)(zval *pDest); +typedef struct { + void *ptr; + uint32_t type_mask; +} zend_type; +typedef struct { + uint32_t num_types; + zend_type types[1]; +} zend_type_list; +typedef union _zend_value { + zend_long lval; + double dval; + zend_refcounted *counted; + zend_string *str; + zend_array *arr; + zend_object *obj; + zend_resource *res; + zend_reference *ref; + zend_ast_ref *ast; + zval *zv; + void *ptr; + zend_class_entry *ce; + zend_function *func; + struct { + uint32_t w1; + uint32_t w2; + } ww; +} zend_value; +struct _zval_struct { + zend_value value; + union { + uint32_t type_info; + struct { + uint8_t type; uint8_t type_flags; union { uint16_t extra; } u; + } v; + } u1; + union { + uint32_t next; + uint32_t cache_slot; + uint32_t opline_num; + uint32_t lineno; + uint32_t num_args; + uint32_t fe_pos; + uint32_t fe_iter_idx; + uint32_t guard; + uint32_t constant_flags; + uint32_t extra; + } u2; +}; +typedef struct _zend_refcounted_h { + uint32_t refcount; + union { + uint32_t type_info; + } u; +} zend_refcounted_h; +struct _zend_refcounted { + zend_refcounted_h gc; +}; +struct _zend_string { + zend_refcounted_h gc; + zend_ulong h; + size_t len; + char val[1]; +}; +typedef struct _Bucket { + zval val; + zend_ulong h; + zend_string *key; +} Bucket; +typedef struct _zend_array HashTable; +struct _zend_array { + zend_refcounted_h gc; + union { + struct { + uint8_t flags; uint8_t _unused; uint8_t nIteratorsCount; uint8_t _unused2; + } v; + uint32_t flags; + } u; + uint32_t nTableMask; + union { + uint32_t *arHash; + Bucket *arData; + zval *arPacked; + }; + uint32_t nNumUsed; + uint32_t nNumOfElements; + uint32_t nTableSize; + uint32_t nInternalPointer; + zend_long nNextFreeElement; + dtor_func_t pDestructor; +}; +typedef uint32_t HashPosition; +typedef struct _HashTableIterator { + HashTable *ht; + HashPosition pos; + uint32_t next_copy; +} HashTableIterator; +struct _zend_object { + zend_refcounted_h gc; + uint32_t handle; + uint32_t extra_flags; + zend_class_entry *ce; + const zend_object_handlers *handlers; + HashTable *properties; + zval properties_table[1]; +}; +struct _zend_resource { + zend_refcounted_h gc; + zend_long handle; + int type; + void *ptr; +}; +typedef union { + struct _zend_property_info *ptr; + uintptr_t list; +} zend_property_info_source_list; +struct _zend_reference { + zend_refcounted_h gc; + zval val; + zend_property_info_source_list sources; +}; +struct _zend_ast_ref { + zend_refcounted_h gc; +}; +typedef struct _zend_llist_element { + struct _zend_llist_element *next; + struct _zend_llist_element *prev; + char data[1]; +} zend_llist_element; +typedef void (*llist_dtor_func_t)(void *); +typedef struct _zend_llist { + zend_llist_element *head; + zend_llist_element *tail; + size_t count; + size_t size; + llist_dtor_func_t dtor; + unsigned char persistent; + zend_llist_element *traverse_ptr; +} zend_llist; +typedef struct { + zval *cur; + zval *end; + zval *start; +} zend_get_gc_buffer; +typedef uint16_t zend_ast_kind; +typedef uint16_t zend_ast_attr; +struct _zend_ast { + zend_ast_kind kind; + zend_ast_attr attr; + uint32_t lineno; + zend_ast *child[1]; +}; +typedef struct _zend_ast_list { + zend_ast_kind kind; + zend_ast_attr attr; + uint32_t lineno; + uint32_t children; + zend_ast *child[1]; +} zend_ast_list; +typedef struct _zend_ast_zval { + zend_ast_kind kind; + zend_ast_attr attr; + zval val; +} zend_ast_zval; +typedef struct _zend_op_array zend_op_array; +typedef struct _zend_ast_op_array { + zend_ast_kind kind; + zend_ast_attr attr; + uint32_t lineno; + zend_op_array *op_array; +} zend_ast_op_array; +typedef struct _zend_ast_decl { + zend_ast_kind kind; + zend_ast_attr attr; + uint32_t start_lineno; + uint32_t end_lineno; + uint32_t flags; + zend_string *doc_comment; + zend_string *name; + zend_ast *child[5]; +} zend_ast_decl; +typedef void (*zend_ast_process_t)(zend_ast *ast); +typedef struct _zend_object_iterator zend_object_iterator; +typedef struct _zend_object_iterator_funcs { + void (*dtor)(zend_object_iterator *iter); + zend_result (*valid)(zend_object_iterator *iter); + zval *(*get_current_data)(zend_object_iterator *iter); + void (*get_current_key)(zend_object_iterator *iter, zval *key); + void (*move_forward)(zend_object_iterator *iter); + void (*rewind)(zend_object_iterator *iter); + void (*invalidate_current)(zend_object_iterator *iter); + HashTable *(*get_gc)(zend_object_iterator *iter, zval **table, int *n); +} zend_object_iterator_funcs; +struct _zend_object_iterator { + zend_object std; + zval data; + const zend_object_iterator_funcs *funcs; + zend_ulong index; +}; +typedef struct _zend_class_iterator_funcs { + zend_function *zf_new_iterator; + zend_function *zf_valid; + zend_function *zf_current; + zend_function *zf_key; + zend_function *zf_next; + zend_function *zf_rewind; +} zend_class_iterator_funcs; +typedef struct _zend_class_arrayaccess_funcs { + zend_function *zf_offsetget; + zend_function *zf_offsetexists; + zend_function *zf_offsetset; + zend_function *zf_offsetunset; +} zend_class_arrayaccess_funcs; +typedef size_t (*zend_stream_fsizer_t)(void* handle); +typedef ssize_t (*zend_stream_reader_t)(void* handle, char *buf, size_t len); +typedef void (*zend_stream_closer_t)(void* handle); +typedef struct _zend_stream { + void *handle; + int isatty; + zend_stream_reader_t reader; + zend_stream_fsizer_t fsizer; + zend_stream_closer_t closer; +} zend_stream; +typedef struct _zend_file_handle { + union { + FILE *fp; + zend_stream stream; + } handle; + zend_string *filename; + zend_string *opened_path; + uint8_t type; + _Bool primary_script; + _Bool in_list; + char *buf; + size_t len; +} zend_file_handle; +struct _zend_serialize_data; +struct _zend_unserialize_data; +typedef struct _zend_serialize_data zend_serialize_data; +typedef struct _zend_unserialize_data zend_unserialize_data; +typedef struct _zend_class_name { + zend_string *name; + zend_string *lc_name; +} zend_class_name; +typedef struct _zend_trait_method_reference { + zend_string *method_name; + zend_string *class_name; +} zend_trait_method_reference; +typedef struct _zend_trait_precedence { + zend_trait_method_reference trait_method; + uint32_t num_excludes; + zend_string *exclude_class_names[1]; +} zend_trait_precedence; +typedef struct _zend_trait_alias { + zend_trait_method_reference trait_method; + zend_string *alias; + uint32_t modifiers; +} zend_trait_alias; +typedef struct _zend_class_mutable_data { + zval *default_properties_table; + HashTable *constants_table; + uint32_t ce_flags; + HashTable *backed_enum_table; +} zend_class_mutable_data; +typedef struct _zend_class_dependency { + zend_string *name; + zend_class_entry *ce; +} zend_class_dependency; +typedef struct _zend_inheritance_cache_entry zend_inheritance_cache_entry; +typedef struct _zend_error_info { + int type; + uint32_t lineno; + zend_string *filename; + zend_string *message; +} zend_error_info; +struct _zend_inheritance_cache_entry { + zend_inheritance_cache_entry *next; + zend_class_entry *ce; + zend_class_entry *parent; + zend_class_dependency *dependencies; + uint32_t dependencies_count; + uint32_t num_warnings; + zend_error_info **warnings; + zend_class_entry *traits_and_interfaces[1]; +}; +struct _zend_class_entry { + char type; + zend_string *name; + union { + zend_class_entry *parent; + zend_string *parent_name; + }; + int refcount; + uint32_t ce_flags; + int default_properties_count; + int default_static_members_count; + zval *default_properties_table; + zval *default_static_members_table; + zval * static_members_table__ptr; + HashTable function_table; + HashTable properties_info; + HashTable constants_table; + zend_class_mutable_data* mutable_data__ptr; + zend_inheritance_cache_entry *inheritance_cache; + struct _zend_property_info **properties_info_table; + zend_function *constructor; + zend_function *destructor; + zend_function *clone; + zend_function *__get; + zend_function *__set; + zend_function *__unset; + zend_function *__isset; + zend_function *__call; + zend_function *__callstatic; + zend_function *__tostring; + zend_function *__debugInfo; + zend_function *__serialize; + zend_function *__unserialize; + const zend_object_handlers *default_object_handlers; + zend_class_iterator_funcs *iterator_funcs_ptr; + zend_class_arrayaccess_funcs *arrayaccess_funcs_ptr; + union { + zend_object* (*create_object)(zend_class_entry *class_type); + int (*interface_gets_implemented)(zend_class_entry *iface, zend_class_entry *class_type); + }; + zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref); + zend_function *(*get_static_method)(zend_class_entry *ce, zend_string* method); + int (*serialize)(zval *object, unsigned char **buffer, size_t *buf_len, zend_serialize_data *data); + int (*unserialize)(zval *object, zend_class_entry *ce, const unsigned char *buf, size_t buf_len, zend_unserialize_data *data); + uint32_t num_interfaces; + uint32_t num_traits; + uint32_t num_hooked_props; + uint32_t num_hooked_prop_variance_checks; + union { + zend_class_entry **interfaces; + zend_class_name *interface_names; + }; + zend_class_name *trait_names; + zend_trait_alias **trait_aliases; + zend_trait_precedence **trait_precedences; + HashTable *attributes; + uint32_t enum_backing_type; + HashTable *backed_enum_table; + zend_string *doc_comment; + union { + struct { + zend_string *filename; + uint32_t line_start; + uint32_t line_end; + } user; + struct { + const struct _zend_function_entry *builtin_functions; + struct _zend_module_entry *module; + } internal; + } info; +}; +typedef enum { + EH_NORMAL = 0, + EH_THROW +} zend_error_handling_t; +typedef enum { + ZEND_PROPERTY_HOOK_GET = 0, + ZEND_PROPERTY_HOOK_SET = 1, +} zend_property_hook_kind; +typedef struct _zend_lazy_objects_store { + HashTable infos; +} zend_lazy_objects_store; +typedef struct _zend_property_info zend_property_info; +struct _zend_property_info; +typedef zval *(*zend_object_read_property_t)(zend_object *object, zend_string *member, int type, void **cache_slot, zval *rv); +typedef zval *(*zend_object_read_dimension_t)(zend_object *object, zval *offset, int type, zval *rv); +typedef zval *(*zend_object_write_property_t)(zend_object *object, zend_string *member, zval *value, void **cache_slot); +typedef void (*zend_object_write_dimension_t)(zend_object *object, zval *offset, zval *value); +typedef zval *(*zend_object_get_property_ptr_ptr_t)(zend_object *object, zend_string *member, int type, void **cache_slot); +typedef int (*zend_object_has_property_t)(zend_object *object, zend_string *member, int has_set_exists, void **cache_slot); +typedef int (*zend_object_has_dimension_t)(zend_object *object, zval *member, int check_empty); +typedef void (*zend_object_unset_property_t)(zend_object *object, zend_string *member, void **cache_slot); +typedef void (*zend_object_unset_dimension_t)(zend_object *object, zval *offset); +typedef HashTable *(*zend_object_get_properties_t)(zend_object *object); +typedef HashTable *(*zend_object_get_debug_info_t)(zend_object *object, int *is_temp); +typedef enum _zend_prop_purpose { + ZEND_PROP_PURPOSE_DEBUG, + ZEND_PROP_PURPOSE_ARRAY_CAST, + ZEND_PROP_PURPOSE_SERIALIZE, + ZEND_PROP_PURPOSE_VAR_EXPORT, + ZEND_PROP_PURPOSE_JSON, + ZEND_PROP_PURPOSE_GET_OBJECT_VARS, + _ZEND_PROP_PURPOSE_NON_EXHAUSTIVE_ENUM +} zend_prop_purpose; +typedef zend_array *(*zend_object_get_properties_for_t)(zend_object *object, zend_prop_purpose purpose); +typedef zend_function *(*zend_object_get_method_t)(zend_object **object, zend_string *method, const zval *key); +typedef zend_function *(*zend_object_get_constructor_t)(zend_object *object); +typedef void (*zend_object_free_obj_t)(zend_object *object); +typedef void (*zend_object_dtor_obj_t)(zend_object *object); +typedef zend_object* (*zend_object_clone_obj_t)(zend_object *object); +typedef zend_object* (*zend_object_clone_obj_with_t)(zend_object *object, const zend_class_entry *scope, const HashTable *properties); +typedef zend_string *(*zend_object_get_class_name_t)(const zend_object *object); +typedef int (*zend_object_compare_t)(zval *object1, zval *object2); +typedef zend_result (*zend_object_cast_t)(zend_object *readobj, zval *retval, int type); +typedef zend_result (*zend_object_count_elements_t)(zend_object *object, zend_long *count); +typedef zend_result (*zend_object_get_closure_t)(zend_object *obj, zend_class_entry **ce_ptr, zend_function **fptr_ptr, zend_object **obj_ptr, _Bool check_only); +typedef HashTable *(*zend_object_get_gc_t)(zend_object *object, zval **table, int *n); +typedef zend_result (*zend_object_do_operation_t)(uint8_t opcode, zval *result, zval *op1, zval *op2); +struct _zend_object_handlers { + int offset; + zend_object_free_obj_t free_obj; + zend_object_dtor_obj_t dtor_obj; + zend_object_clone_obj_t clone_obj; + zend_object_clone_obj_with_t clone_obj_with; + zend_object_read_property_t read_property; + zend_object_write_property_t write_property; + zend_object_read_dimension_t read_dimension; + zend_object_write_dimension_t write_dimension; + zend_object_get_property_ptr_ptr_t get_property_ptr_ptr; + zend_object_has_property_t has_property; + zend_object_unset_property_t unset_property; + zend_object_has_dimension_t has_dimension; + zend_object_unset_dimension_t unset_dimension; + zend_object_get_properties_t get_properties; + zend_object_get_method_t get_method; + zend_object_get_constructor_t get_constructor; + zend_object_get_class_name_t get_class_name; + zend_object_cast_t cast_object; + zend_object_count_elements_t count_elements; + zend_object_get_debug_info_t get_debug_info; + zend_object_get_closure_t get_closure; + zend_object_get_gc_t get_gc; + zend_object_do_operation_t do_operation; + zend_object_compare_t compare; + zend_object_get_properties_for_t get_properties_for; +}; +typedef struct _zend_strtod_bigint zend_strtod_bigint; +typedef struct _zend_strtod_state { + zend_strtod_bigint *freelist[7 +1]; + zend_strtod_bigint *p5s; + char *result; +} zend_strtod_state; +typedef const void* zend_vm_opcode_handler_t; +typedef struct _zend_op zend_op; +typedef struct { + void *handler; + uint32_t num_args; +} zend_frameless_function_info; +typedef union _znode_op { + uint32_t constant; + uint32_t var; + uint32_t num; + uint32_t opline_num; + uint32_t jmp_offset; +} znode_op; +typedef struct _zend_declarables { + zend_long ticks; +} zend_declarables; +typedef struct _zend_file_context { + zend_declarables declarables; + zend_string *current_namespace; + _Bool in_namespace; + _Bool has_bracketed_namespaces; + HashTable *imports; + HashTable *imports_function; + HashTable *imports_const; + HashTable seen_symbols; +} zend_file_context; +typedef int (*user_opcode_handler_t) (zend_execute_data *execute_data); +struct _zend_op { + zend_vm_opcode_handler_t handler; + znode_op op1; + znode_op op2; + znode_op result; + uint32_t extended_value; + uint32_t lineno; + uint8_t opcode; + uint8_t op1_type; + uint8_t op2_type; + uint8_t result_type; +}; +typedef struct _zend_brk_cont_element { + int start; + int cont; + int brk; + int parent; + _Bool is_switch; +} zend_brk_cont_element; +typedef struct _zend_try_catch_element { + uint32_t try_op; + uint32_t catch_op; + uint32_t finally_op; + uint32_t finally_end; +} zend_try_catch_element; +typedef struct _zend_live_range { + uint32_t var; + uint32_t start; + uint32_t end; +} zend_live_range; +typedef struct _zend_oparray_context { + struct _zend_oparray_context *prev; + zend_op_array *op_array; + uint32_t opcodes_size; + int vars_size; + int literals_size; + uint32_t fast_call_var; + uint32_t try_catch_offset; + int current_brk_cont; + int last_brk_cont; + zend_brk_cont_element *brk_cont_array; + HashTable *labels; + zend_string *active_property_info_name; + zend_property_hook_kind active_property_hook_kind; + _Bool in_jmp_frameless_branch; + _Bool has_assigned_to_http_response_header; +} zend_oparray_context; +struct _zend_property_info { + uint32_t offset; + uint32_t flags; + zend_string *name; + zend_string *doc_comment; + HashTable *attributes; + zend_class_entry *ce; + zend_type type; + const zend_property_info *prototype; + zend_function **hooks; +}; +typedef struct _zend_class_constant { + zval value; + zend_string *doc_comment; + HashTable *attributes; + zend_class_entry *ce; + zend_type type; +} zend_class_constant; +typedef struct _zend_internal_arg_info { + const char *name; + zend_type type; + const char *default_value; +} zend_internal_arg_info; +typedef struct _zend_arg_info { + zend_string *name; + zend_type type; + zend_string *default_value; +} zend_arg_info; +struct _zend_op_array { + uint8_t type; + uint8_t arg_flags[3]; + uint32_t fn_flags; + zend_string *function_name; + zend_class_entry *scope; + zend_function *prototype; + uint32_t num_args; + uint32_t required_num_args; + zend_arg_info *arg_info; + HashTable *attributes; + void ** run_time_cache__ptr; + zend_string *doc_comment; + uint32_t T; + const zend_property_info *prop_info; + int cache_size; + int last_var; + uint32_t last; + zend_op *opcodes; + HashTable * static_variables_ptr__ptr; + HashTable *static_variables; + zend_string **vars; + uint32_t *refcount; + int last_live_range; + int last_try_catch; + zend_live_range *live_range; + zend_try_catch_element *try_catch_array; + zend_string *filename; + uint32_t line_start; + uint32_t line_end; + int last_literal; + uint32_t num_dynamic_func_defs; + zval *literals; + zend_op_array **dynamic_func_defs; + void *reserved[6]; +}; +typedef void ( *zif_handler)(zend_execute_data *execute_data, zval *return_value); +typedef struct _zend_internal_function { + uint8_t type; + uint8_t arg_flags[3]; + uint32_t fn_flags; + zend_string* function_name; + zend_class_entry *scope; + zend_function *prototype; + uint32_t num_args; + uint32_t required_num_args; + zend_internal_arg_info *arg_info; + HashTable *attributes; + void ** run_time_cache__ptr; + zend_string *doc_comment; + uint32_t T; + const zend_property_info *prop_info; + zif_handler handler; + struct _zend_module_entry *module; + const zend_frameless_function_info *frameless_function_infos; + void *reserved[6]; +} zend_internal_function; +union _zend_function { + uint8_t type; + uint32_t quick_arg_flags; + struct { + uint8_t type; + uint8_t arg_flags[3]; + uint32_t fn_flags; + zend_string *function_name; + zend_class_entry *scope; + zend_function *prototype; + uint32_t num_args; + uint32_t required_num_args; + zend_arg_info *arg_info; + HashTable *attributes; + void ** run_time_cache__ptr; + zend_string *doc_comment; + uint32_t T; + const zend_property_info *prop_info; + } common; + zend_op_array op_array; + zend_internal_function internal_function; +}; +struct _zend_execute_data { + const zend_op *opline; + zend_execute_data *call; + zval *return_value; + zend_function *func; + zval This; + zend_execute_data *prev_execute_data; + zend_array *symbol_table; + void **run_time_cache; + zend_array *extra_named_params; +}; +typedef struct __jmp_buf_tag sigjmp_buf[1]; +typedef struct _zend_compiler_globals zend_compiler_globals; +typedef struct _zend_executor_globals zend_executor_globals; +typedef struct zend_atomic_bool_s { + _Bool value; +} zend_atomic_bool; +typedef struct _zend_stack { + int size, top, max; + void *elements; +} zend_stack; +typedef struct _zend_ptr_stack { + int top, max; + void **elements; + void **top_element; + _Bool persistent; +} zend_ptr_stack; +typedef struct _zend_objects_store { + zend_object **object_buckets; + uint32_t top; + uint32_t size; + int free_list_head; +} zend_objects_store; +typedef struct _zend_encoding zend_encoding; +typedef size_t (*zend_encoding_filter)(unsigned char **str, size_t *str_length, const unsigned char *buf, size_t length); +typedef struct _zend_arena zend_arena; +struct _zend_arena { + char *ptr; + char *end; + zend_arena *prev; +}; +typedef struct _zend_call_stack { + void *base; + size_t max_size; +} zend_call_stack; +typedef struct _zend_vm_stack *zend_vm_stack; +typedef struct _zend_ini_entry zend_ini_entry; +typedef struct _zend_fiber_context zend_fiber_context; +typedef struct _zend_fiber zend_fiber; +typedef enum { + ZEND_MEMOIZE_NONE, + ZEND_MEMOIZE_COMPILE, + ZEND_MEMOIZE_FETCH, +} zend_memoize_mode; +struct _zend_compiler_globals { + zend_stack loop_var_stack; + zend_class_entry *active_class_entry; + zend_string *compiled_filename; + int zend_lineno; + zend_op_array *active_op_array; + HashTable *function_table; + HashTable *class_table; + HashTable *auto_globals; + uint8_t parse_error; + _Bool in_compilation; + _Bool short_tags; + _Bool unclean_shutdown; + _Bool ini_parser_unbuffered_errors; + zend_llist open_files; + struct _zend_ini_parser_param *ini_parser_param; + _Bool skip_shebang; + _Bool increment_lineno; + _Bool variable_width_locale; + _Bool ascii_compatible_locale; + zend_string *doc_comment; + uint32_t extra_fn_flags; + uint32_t compiler_options; + zend_oparray_context context; + zend_file_context file_context; + zend_arena *arena; + HashTable interned_strings; + const zend_encoding **script_encoding_list; + size_t script_encoding_list_size; + _Bool multibyte; + _Bool detect_unicode; + _Bool encoding_declared; + zend_ast *ast; + zend_arena *ast_arena; + zend_stack delayed_oplines_stack; + HashTable *memoized_exprs; + zend_memoize_mode memoize_mode; + void *map_ptr_real_base; + void *map_ptr_base; + size_t map_ptr_size; + size_t map_ptr_last; + HashTable *delayed_variance_obligations; + HashTable *delayed_autoloads; + HashTable *unlinked_uses; + zend_class_entry *current_linking_class; + uint32_t rtd_key_counter; + void *internal_run_time_cache; + uint32_t internal_run_time_cache_size; + zend_stack short_circuiting_opnums; + uint32_t copied_functions_count; +}; +struct _zend_executor_globals { + zval uninitialized_zval; + zval error_zval; + zend_array *symtable_cache[32]; + zend_array **symtable_cache_limit; + zend_array **symtable_cache_ptr; + zend_array symbol_table; + HashTable included_files; + sigjmp_buf *bailout; + int error_reporting; + _Bool fatal_error_backtrace_on; + zval last_fatal_error_backtrace; + int exit_status; + HashTable *function_table; + HashTable *class_table; + HashTable *zend_constants; + zval *vm_stack_top; + zval *vm_stack_end; + zend_vm_stack vm_stack; + size_t vm_stack_page_size; + struct _zend_execute_data *current_execute_data; + const zend_class_entry *fake_scope; + uint32_t jit_trace_num; + zend_execute_data *current_observed_frame; + int ticks_count; + zend_long precision; + uint32_t persistent_constants_count; + uint32_t persistent_functions_count; + uint32_t persistent_classes_count; + _Bool no_extensions; + _Bool full_tables_cleanup; + zend_atomic_bool vm_interrupt; + zend_atomic_bool timed_out; + HashTable *in_autoload; + zend_long hard_timeout; + void *stack_base; + void *stack_limit; + HashTable regular_list; + HashTable persistent_list; + int user_error_handler_error_reporting; + _Bool exception_ignore_args; + zval user_error_handler; + zval user_exception_handler; + zend_stack user_error_handlers_error_reporting; + zend_stack user_error_handlers; + zend_stack user_exception_handlers; + zend_class_entry *exception_class; + zend_error_handling_t error_handling; + int capture_warnings_during_sccp; + zend_long timeout_seconds; + HashTable *ini_directives; + HashTable *modified_ini_directives; + zend_ini_entry *error_reporting_ini_entry; + zend_objects_store objects_store; + zend_lazy_objects_store lazy_objects_store; + zend_object *exception, *prev_exception; + const zend_op *opline_before_exception; + zend_op exception_op[3]; + struct _zend_module_entry *current_module; + _Bool active; + uint8_t flags; + zend_long assertions; + uint32_t ht_iterators_count; + uint32_t ht_iterators_used; + HashTableIterator *ht_iterators; + HashTableIterator ht_iterators_slots[16]; + void *saved_fpu_cw_ptr; + zend_function trampoline; + zend_op call_trampoline_op; + HashTable weakrefs; + zend_long exception_string_param_max_len; + zend_get_gc_buffer get_gc_buffer; + zend_fiber_context *main_fiber_context; + zend_fiber_context *current_fiber_context; + zend_fiber *active_fiber; + size_t fiber_stack_size; + _Bool record_errors; + uint32_t num_errors; + zend_error_info **errors; + zend_string *filename_override; + zend_long lineno_override; + zend_call_stack call_stack; + zend_long max_allowed_stack_size; + zend_ulong reserved_stack_size; + timer_t max_execution_timer_timer; + pid_t pid; + struct sigaction oldact; + zend_strtod_state strtod_state; + void *reserved[6]; +}; +typedef enum { + ON_TOKEN, + ON_FEEDBACK, + ON_STOP +} zend_php_scanner_event; +typedef struct _zend_module_entry zend_module_entry; +typedef struct _zend_module_dep zend_module_dep; +struct _zend_module_entry { + unsigned short size; + unsigned int zend_api; + unsigned char zend_debug; + unsigned char zts; + const struct _zend_ini_entry *ini_entry; + const struct _zend_module_dep *deps; + const char *name; + const struct _zend_function_entry *functions; + zend_result (*module_startup_func)(int type, int module_number); + zend_result (*module_shutdown_func)(int type, int module_number); + zend_result (*request_startup_func)(int type, int module_number); + zend_result (*request_shutdown_func)(int type, int module_number); + void (*info_func)(zend_module_entry *zend_module); + const char *version; + size_t globals_size; + ts_rsrc_id* globals_id_ptr; + void (*globals_ctor)(void *global); + void (*globals_dtor)(void *global); + zend_result (*post_deactivate_func)(void); + int module_started; + unsigned char type; + void *handle; + int module_number; + const char *build_id; +}; +struct _zend_module_dep { + const char *name; + const char *rel; + const char *version; + unsigned char type; +}; +typedef struct _zend_constant { + zval value; + zend_string *name; + zend_string *filename; + HashTable *attributes; +} zend_constant; +struct _zend_vm_stack { + zval *top; + zval *end; + zend_vm_stack prev; +}; +struct _zend_function_entry { + const char *fname; + zif_handler handler; + const struct _zend_internal_arg_info *arg_info; + uint32_t num_args; + uint32_t flags; + const zend_frameless_function_info *frameless_function_infos; + const char *doc_comment; +}; +typedef struct _zend_ini_entry_def { + const char *name; + int (*on_modify)(zend_ini_entry *entry, zend_string *new_value, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage); + void *mh_arg1; + void *mh_arg2; + void *mh_arg3; + const char *value; + void (*displayer)(zend_ini_entry *ini_entry, int type); + uint32_t value_length; + uint16_t name_length; + uint8_t modifiable; +} zend_ini_entry_def; +struct _zend_ini_entry { + zend_string *name; + int (*on_modify)(zend_ini_entry *entry, zend_string *new_value, void *mh_arg1, void *mh_arg2, void *mh_arg3, int stage); + void *mh_arg1; + void *mh_arg2; + void *mh_arg3; + zend_string *value; + zend_string *orig_value; + void (*displayer)(zend_ini_entry *ini_entry, int type); + int module_number; + uint8_t modifiable; + uint8_t orig_modifiable; + uint8_t modified; + const zend_ini_entry_def *def; +}; +typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg); +struct _zend_ini_parser_param { + zend_ini_parser_cb_t ini_parser_cb; + void *arg; +}; +typedef struct { + zend_string *name; + zval value; +} zend_attribute_arg; +typedef struct _zend_attribute { + zend_string *name; + zend_string *lcname; + zend_string *validation_error; + uint32_t flags; + uint32_t lineno; + uint32_t offset; + uint32_t argc; + zend_attribute_arg args[1]; +} zend_attribute; +typedef struct _zend_lex_state { + unsigned int yy_leng; + unsigned char *yy_start; + unsigned char *yy_text; + unsigned char *yy_cursor; + unsigned char *yy_marker; + unsigned char *yy_limit; + int yy_state; + zend_stack state_stack; + zend_ptr_stack heredoc_label_stack; + zend_stack nest_location_stack; + zend_file_handle *in; + uint32_t lineno; + zend_string *filename; + unsigned char *script_org; + size_t script_org_size; + unsigned char *script_filtered; + size_t script_filtered_size; + zend_encoding_filter input_filter; + zend_encoding_filter output_filter; + const zend_encoding *script_encoding; + void (*on_event)( + zend_php_scanner_event event, int token, int line, + const char *text, size_t length, void *context); + void *on_event_context; + zend_ast *ast; + zend_arena *ast_arena; +} zend_lex_state; +typedef struct _zend_script { + zend_string *filename; + zend_op_array main_op_array; + HashTable function_table; + HashTable class_table; +} zend_script; +typedef struct _zend_closure { + zend_object std; + zend_function func; + zval this_ptr; + zend_class_entry *called_scope; + zif_handler orig_internal_handler; +} zend_closure; +typedef time_t accel_time_t; +typedef struct _zend_early_binding { + zend_string *lcname; + zend_string *rtd_key; + zend_string *lc_parent_name; + uint32_t cache_slot; +} zend_early_binding; +typedef struct _zend_persistent_script { + zend_script script; + zend_long compiler_halt_offset; + int ping_auto_globals_mask; + accel_time_t timestamp; + _Bool corrupted; + _Bool is_phar; + _Bool empty; + uint32_t num_warnings; + uint32_t num_early_bindings; + zend_error_info **warnings; + zend_early_binding *early_bindings; + void *mem; + size_t size; + struct zend_persistent_script_dynamic_members { + time_t last_used; + zend_ulong hits; + unsigned int memory_consumption; + time_t revalidate; + } dynamic_members; +} zend_persistent_script; +typedef struct _zend_file_cache_metainfo { + char magic[8]; + char system_id[32]; + size_t mem_size; + size_t str_size; + size_t script_offset; + accel_time_t timestamp; + uint32_t checksum; +} zend_file_cache_metainfo; + +/* Imported functions */ +extern zend_result zend_hash_del(HashTable *, zend_string *); +extern zend_result zend_hash_index_del(HashTable *, zend_ulong); +extern zval * zend_hash_find(const HashTable *, zend_string *); +extern zval * zend_hash_add_or_update(HashTable *, zend_string *, zval *, uint32_t); +extern zval * zend_hash_index_add_or_update(HashTable *, zend_ulong, zval *, uint32_t); +extern zval * zend_hash_index_find(const HashTable *, zend_ulong); +extern void zend_hash_destroy(HashTable *); +extern zend_result zend_set_user_opcode_handler(uint8_t, user_opcode_handler_t); +extern user_opcode_handler_t zend_get_user_opcode_handler(uint8_t); +extern void zend_do_inheritance_ex(zend_class_entry *, zend_class_entry *, _Bool); +extern zend_object * zend_objects_new(zend_class_entry *); +extern void zend_object_std_init(zend_object *, zend_class_entry *); +extern void object_properties_init(zend_object *, zend_class_entry *); +extern void zend_objects_store_put(zend_object *); +extern void zend_save_lexical_state(zend_lex_state *); +extern void zend_restore_lexical_state(zend_lex_state *); +extern void zend_prepare_string_for_scanning(zval *, zend_string *); +extern zend_result zend_lex_tstring(zval *, unsigned char *); +extern int zendparse(void); +extern void zend_ast_destroy(zend_ast *); +extern zend_ast * zend_ast_create_list_0(zend_ast_kind); +extern zend_ast * zend_ast_list_add(zend_ast *, zend_ast *); +extern zend_ast * zend_ast_create_zval_ex(const zval *, zend_ast_attr); +extern zend_ast * zend_ast_create_0(zend_ast_kind); +extern zend_ast * zend_ast_create_1(zend_ast_kind, zend_ast *); +extern zend_ast * zend_ast_create_2(zend_ast_kind, zend_ast *, zend_ast *); +extern zend_ast * zend_ast_create_3(zend_ast_kind, zend_ast *, zend_ast *, zend_ast *); +extern zend_ast * zend_ast_create_4(zend_ast_kind, zend_ast *, zend_ast *, zend_ast *, zend_ast *); +extern zend_ast * zend_ast_create_5(zend_ast_kind, zend_ast *, zend_ast *, zend_ast *, zend_ast *, zend_ast *); +extern zend_ast * zend_ast_create_decl(zend_ast_kind, uint32_t, uint32_t, zend_string *, zend_string *, zend_ast *, zend_ast *, zend_ast *, zend_ast *, zend_ast *); +extern void destroy_op_array(zend_op_array *); +extern void zend_destroy_static_vars(zend_op_array *); +extern void destroy_zend_class(zval *); +extern HashTable * zend_array_dup(const HashTable *); +extern void zend_iterator_init(zend_object_iterator *); +extern zend_module_entry * zend_register_module_ex(zend_module_entry *, int); +extern zend_result zend_startup_module_ex(zend_module_entry *); +extern zend_constant * zend_register_constant(zend_constant *); +extern void zend_clear_exception(void); +extern void zval_ptr_dtor(zval *); +extern void zval_add_ref(zval *); +extern void rc_dtor_func(zend_refcounted *); +extern zend_string * zend_string_concat2(const char *, size_t, const char *, size_t); +extern zend_ulong zend_string_hash_func(zend_string *); +extern void free(void *); +extern void * tsrm_get_ls_cache(void); + +/* Imported globals */ +extern size_t executor_globals_offset; +extern size_t compiler_globals_offset; +extern HashTable module_registry; +extern const zend_object_handlers std_object_handlers; +extern zend_ast_process_t zend_ast_process; +extern void (*zend_error_cb)(int, zend_string *, const uint32_t, zend_string *); +extern void (*zend_throw_exception_hook)(zend_object *); +extern void (*zend_interrupt_function)(zend_execute_data *); +extern char zend_system_id[32]; diff --git a/include/8.5/linux-x64-zts/layouts.json b/include/8.5/linux-x64-zts/layouts.json new file mode 100644 index 0000000..b9e19ab --- /dev/null +++ b/include/8.5/linux-x64-zts/layouts.json @@ -0,0 +1,697 @@ +{ + "meta": { + "php": "8.5", + "api": 20250925, + "zts": 1, + "debug": 0 + }, + "structs": { + "zval": { + "size": 16, + "fields": { + "value": 0, + "u1": 8, + "u2": 12 + } + }, + "zend_refcounted": { + "size": 8, + "fields": { + "gc": 0 + } + }, + "zend_string": { + "size": 32, + "fields": { + "gc": 0, + "h": 8, + "len": 16, + "val": 24 + } + }, + "zend_array": { + "size": 56, + "fields": { + "gc": 0, + "u": 8, + "nTableMask": 12, + "arHash": 16, + "arData": 16, + "arPacked": 16, + "nNumUsed": 24, + "nNumOfElements": 28, + "nTableSize": 32, + "nInternalPointer": 36, + "nNextFreeElement": 40, + "pDestructor": 48 + } + }, + "Bucket": { + "size": 32, + "fields": { + "val": 0, + "h": 16, + "key": 24 + } + }, + "zend_object": { + "size": 56, + "fields": { + "gc": 0, + "handle": 8, + "extra_flags": 12, + "ce": 16, + "handlers": 24, + "properties": 32, + "properties_table": 40 + } + }, + "zend_resource": { + "size": 32, + "fields": { + "gc": 0, + "handle": 8, + "type": 16, + "ptr": 24 + } + }, + "zend_reference": { + "size": 32, + "fields": { + "gc": 0, + "val": 8, + "sources": 24 + } + }, + "zend_class_entry": { + "size": 520, + "fields": { + "type": 0, + "name": 8, + "parent": 16, + "parent_name": 16, + "refcount": 24, + "ce_flags": 28, + "default_properties_count": 32, + "default_static_members_count": 36, + "default_properties_table": 40, + "default_static_members_table": 48, + "static_members_table__ptr": 56, + "function_table": 64, + "properties_info": 120, + "constants_table": 176, + "mutable_data__ptr": 232, + "inheritance_cache": 240, + "properties_info_table": 248, + "constructor": 256, + "destructor": 264, + "clone": 272, + "__get": 280, + "__set": 288, + "__unset": 296, + "__isset": 304, + "__call": 312, + "__callstatic": 320, + "__tostring": 328, + "__debugInfo": 336, + "__serialize": 344, + "__unserialize": 352, + "default_object_handlers": 360, + "iterator_funcs_ptr": 368, + "arrayaccess_funcs_ptr": 376, + "create_object": 384, + "interface_gets_implemented": 384, + "get_iterator": 392, + "get_static_method": 400, + "serialize": 408, + "unserialize": 416, + "num_interfaces": 424, + "num_traits": 428, + "num_hooked_props": 432, + "num_hooked_prop_variance_checks": 436, + "interfaces": 440, + "interface_names": 440, + "trait_names": 448, + "trait_aliases": 456, + "trait_precedences": 464, + "attributes": 472, + "enum_backing_type": 480, + "backed_enum_table": 488, + "doc_comment": 496, + "info": 504 + } + }, + "zend_class_constant": { + "size": 56, + "fields": { + "value": 0, + "doc_comment": 16, + "attributes": 24, + "ce": 32, + "type": 40 + } + }, + "zend_class_name": { + "size": 16, + "fields": { + "name": 0, + "lc_name": 8 + } + }, + "zend_property_info": { + "size": 72, + "fields": { + "offset": 0, + "flags": 4, + "name": 8, + "doc_comment": 16, + "attributes": 24, + "ce": 32, + "type": 40, + "prototype": 56, + "hooks": 64 + } + }, + "zend_type_list": { + "size": 24, + "fields": { + "num_types": 0, + "types": 8 + } + }, + "zend_constant": { + "size": 40, + "fields": { + "value": 0, + "name": 16, + "filename": 24, + "attributes": 32 + } + }, + "zend_attribute": { + "size": 64, + "fields": { + "name": 0, + "lcname": 8, + "validation_error": 16, + "flags": 24, + "lineno": 28, + "offset": 32, + "argc": 36, + "args": 40 + } + }, + "zend_attribute_arg": { + "size": 24, + "fields": { + "name": 0, + "value": 8 + } + }, + "zend_op_array": { + "size": 256, + "fields": { + "type": 0, + "arg_flags": 1, + "fn_flags": 4, + "function_name": 8, + "scope": 16, + "prototype": 24, + "num_args": 32, + "required_num_args": 36, + "arg_info": 40, + "attributes": 48, + "run_time_cache__ptr": 56, + "doc_comment": 64, + "T": 72, + "prop_info": 80, + "cache_size": 88, + "last_var": 92, + "last": 96, + "opcodes": 104, + "static_variables_ptr__ptr": 112, + "static_variables": 120, + "vars": 128, + "refcount": 136, + "last_live_range": 144, + "last_try_catch": 148, + "live_range": 152, + "try_catch_array": 160, + "filename": 168, + "line_start": 176, + "line_end": 180, + "last_literal": 184, + "num_dynamic_func_defs": 188, + "literals": 192, + "dynamic_func_defs": 200, + "reserved": 208 + } + }, + "zend_internal_function": { + "size": 160, + "fields": { + "type": 0, + "arg_flags": 1, + "fn_flags": 4, + "function_name": 8, + "scope": 16, + "prototype": 24, + "num_args": 32, + "required_num_args": 36, + "arg_info": 40, + "attributes": 48, + "run_time_cache__ptr": 56, + "doc_comment": 64, + "T": 72, + "prop_info": 80, + "handler": 88, + "module": 96, + "frameless_function_infos": 104, + "reserved": 112 + } + }, + "zend_op": { + "size": 32, + "fields": { + "handler": 0, + "op1": 8, + "op2": 12, + "result": 16, + "extended_value": 20, + "lineno": 24, + "opcode": 28, + "op1_type": 29, + "op2_type": 30, + "result_type": 31 + } + }, + "zend_execute_data": { + "size": 80, + "fields": { + "opline": 0, + "call": 8, + "return_value": 16, + "func": 24, + "This": 32, + "prev_execute_data": 48, + "symbol_table": 56, + "run_time_cache": 64, + "extra_named_params": 72 + } + }, + "zend_objects_store": { + "size": 24, + "fields": { + "object_buckets": 0, + "top": 8, + "size": 12, + "free_list_head": 16 + } + }, + "zend_executor_globals": { + "size": 2152, + "fields": { + "uninitialized_zval": 0, + "error_zval": 16, + "symtable_cache": 32, + "symtable_cache_limit": 288, + "symtable_cache_ptr": 296, + "symbol_table": 304, + "included_files": 360, + "bailout": 416, + "error_reporting": 424, + "fatal_error_backtrace_on": 428, + "last_fatal_error_backtrace": 432, + "exit_status": 448, + "function_table": 456, + "class_table": 464, + "zend_constants": 472, + "vm_stack_top": 480, + "vm_stack_end": 488, + "vm_stack": 496, + "vm_stack_page_size": 504, + "current_execute_data": 512, + "fake_scope": 520, + "jit_trace_num": 528, + "current_observed_frame": 536, + "ticks_count": 544, + "precision": 552, + "persistent_constants_count": 560, + "persistent_functions_count": 564, + "persistent_classes_count": 568, + "no_extensions": 572, + "full_tables_cleanup": 573, + "vm_interrupt": 574, + "timed_out": 575, + "in_autoload": 576, + "hard_timeout": 584, + "stack_base": 592, + "stack_limit": 600, + "regular_list": 608, + "persistent_list": 664, + "user_error_handler_error_reporting": 720, + "exception_ignore_args": 724, + "user_error_handler": 728, + "user_exception_handler": 744, + "user_error_handlers_error_reporting": 760, + "user_error_handlers": 784, + "user_exception_handlers": 808, + "exception_class": 832, + "error_handling": 840, + "capture_warnings_during_sccp": 844, + "timeout_seconds": 848, + "ini_directives": 856, + "modified_ini_directives": 864, + "error_reporting_ini_entry": 872, + "objects_store": 880, + "lazy_objects_store": 904, + "exception": 960, + "prev_exception": 968, + "opline_before_exception": 976, + "exception_op": 984, + "current_module": 1080, + "active": 1088, + "flags": 1089, + "assertions": 1096, + "ht_iterators_count": 1104, + "ht_iterators_used": 1108, + "ht_iterators": 1112, + "ht_iterators_slots": 1120, + "saved_fpu_cw_ptr": 1376, + "trampoline": 1384, + "call_trampoline_op": 1640, + "weakrefs": 1672, + "exception_string_param_max_len": 1728, + "get_gc_buffer": 1736, + "main_fiber_context": 1760, + "current_fiber_context": 1768, + "active_fiber": 1776, + "fiber_stack_size": 1784, + "record_errors": 1792, + "num_errors": 1796, + "errors": 1800, + "filename_override": 1808, + "lineno_override": 1816, + "call_stack": 1824, + "max_allowed_stack_size": 1840, + "reserved_stack_size": 1848, + "max_execution_timer_timer": 1856, + "pid": 1864, + "oldact": 1872, + "strtod_state": 2024, + "reserved": 2104 + } + }, + "zend_compiler_globals": { + "size": 624, + "fields": { + "loop_var_stack": 0, + "active_class_entry": 24, + "compiled_filename": 32, + "zend_lineno": 40, + "active_op_array": 48, + "function_table": 56, + "class_table": 64, + "auto_globals": 72, + "parse_error": 80, + "in_compilation": 81, + "short_tags": 82, + "unclean_shutdown": 83, + "ini_parser_unbuffered_errors": 84, + "open_files": 88, + "ini_parser_param": 144, + "skip_shebang": 152, + "increment_lineno": 153, + "variable_width_locale": 154, + "ascii_compatible_locale": 155, + "doc_comment": 160, + "extra_fn_flags": 168, + "compiler_options": 172, + "context": 176, + "file_context": 256, + "arena": 360, + "interned_strings": 368, + "script_encoding_list": 424, + "script_encoding_list_size": 432, + "multibyte": 440, + "detect_unicode": 441, + "encoding_declared": 442, + "ast": 448, + "ast_arena": 456, + "delayed_oplines_stack": 464, + "memoized_exprs": 488, + "memoize_mode": 496, + "map_ptr_real_base": 504, + "map_ptr_base": 512, + "map_ptr_size": 520, + "map_ptr_last": 528, + "delayed_variance_obligations": 536, + "delayed_autoloads": 544, + "unlinked_uses": 552, + "current_linking_class": 560, + "rtd_key_counter": 568, + "internal_run_time_cache": 576, + "internal_run_time_cache_size": 584, + "short_circuiting_opnums": 592, + "copied_functions_count": 616 + } + }, + "zend_module_entry": { + "size": 168, + "fields": { + "size": 0, + "zend_api": 4, + "zend_debug": 8, + "zts": 9, + "ini_entry": 16, + "deps": 24, + "name": 32, + "functions": 40, + "module_startup_func": 48, + "module_shutdown_func": 56, + "request_startup_func": 64, + "request_shutdown_func": 72, + "info_func": 80, + "version": 88, + "globals_size": 96, + "globals_id_ptr": 104, + "globals_ctor": 112, + "globals_dtor": 120, + "post_deactivate_func": 128, + "module_started": 136, + "type": 140, + "handle": 144, + "module_number": 152, + "build_id": 160 + } + }, + "zend_module_dep": { + "size": 32, + "fields": { + "name": 0, + "rel": 8, + "version": 16, + "type": 24 + } + }, + "zend_object_handlers": { + "size": 208, + "fields": { + "offset": 0, + "free_obj": 8, + "dtor_obj": 16, + "clone_obj": 24, + "clone_obj_with": 32, + "read_property": 40, + "write_property": 48, + "read_dimension": 56, + "write_dimension": 64, + "get_property_ptr_ptr": 72, + "has_property": 80, + "unset_property": 88, + "has_dimension": 96, + "unset_dimension": 104, + "get_properties": 112, + "get_method": 120, + "get_constructor": 128, + "get_class_name": 136, + "cast_object": 144, + "count_elements": 152, + "get_debug_info": 160, + "get_closure": 168, + "get_gc": 176, + "do_operation": 184, + "compare": 192, + "get_properties_for": 200 + } + }, + "zend_object_iterator": { + "size": 88, + "fields": { + "std": 0, + "data": 56, + "funcs": 72, + "index": 80 + } + }, + "zend_object_iterator_funcs": { + "size": 64, + "fields": { + "dtor": 0, + "valid": 8, + "get_current_data": 16, + "get_current_key": 24, + "move_forward": 32, + "rewind": 40, + "invalidate_current": 48, + "get_gc": 56 + } + }, + "zend_ast": { + "size": 16, + "fields": { + "kind": 0, + "attr": 2, + "lineno": 4, + "child": 8 + } + }, + "zend_ast_decl": { + "size": 72, + "fields": { + "kind": 0, + "attr": 2, + "start_lineno": 4, + "end_lineno": 8, + "flags": 12, + "doc_comment": 16, + "name": 24, + "child": 32 + } + }, + "zend_ast_list": { + "size": 24, + "fields": { + "kind": 0, + "attr": 2, + "lineno": 4, + "children": 8, + "child": 16 + } + }, + "zend_ast_zval": { + "size": 24, + "fields": { + "kind": 0, + "attr": 2, + "val": 8 + } + }, + "zend_ast_op_array": { + "size": 16, + "fields": { + "kind": 0, + "attr": 2, + "lineno": 4, + "op_array": 8 + } + }, + "zend_lex_state": { + "size": 248, + "fields": { + "yy_leng": 0, + "yy_start": 8, + "yy_text": 16, + "yy_cursor": 24, + "yy_marker": 32, + "yy_limit": 40, + "yy_state": 48, + "state_stack": 56, + "heredoc_label_stack": 80, + "nest_location_stack": 112, + "in": 136, + "lineno": 144, + "filename": 152, + "script_org": 160, + "script_org_size": 168, + "script_filtered": 176, + "script_filtered_size": 184, + "input_filter": 192, + "output_filter": 200, + "script_encoding": 208, + "on_event": 216, + "on_event_context": 224, + "ast": 232, + "ast_arena": 240 + } + }, + "zend_closure": { + "size": 344, + "fields": { + "std": 0, + "func": 56, + "this_ptr": 312, + "called_scope": 328, + "orig_internal_handler": 336 + } + }, + "zend_script": { + "size": 376, + "fields": { + "filename": 0, + "main_op_array": 8, + "function_table": 264, + "class_table": 320 + } + }, + "zend_error_info": { + "size": 24, + "fields": { + "type": 0, + "lineno": 4, + "filename": 8, + "message": 16 + } + }, + "zend_early_binding": { + "size": 32, + "fields": { + "lcname": 0, + "rtd_key": 8, + "lc_parent_name": 16, + "cache_slot": 24 + } + }, + "zend_persistent_script": { + "size": 480, + "fields": { + "script": 0, + "compiler_halt_offset": 376, + "ping_auto_globals_mask": 384, + "timestamp": 392, + "corrupted": 400, + "is_phar": 401, + "empty": 402, + "num_warnings": 404, + "num_early_bindings": 408, + "warnings": 416, + "early_bindings": 424, + "mem": 432, + "size": 440, + "dynamic_members": 448 + } + }, + "zend_file_cache_metainfo": { + "size": 80, + "fields": { + "magic": 0, + "system_id": 8, + "mem_size": 40, + "str_size": 48, + "script_offset": 56, + "timestamp": 64, + "checksum": 72 + } + } + } +} diff --git a/include/8.5/linux-x64-zts/probe.c b/include/8.5/linux-x64-zts/probe.c new file mode 100644 index 0000000..c7b65ee --- /dev/null +++ b/include/8.5/linux-x64-zts/probe.c @@ -0,0 +1,1540 @@ +#include "php.h" +#include "zend_ast.h" +#include "zend_attributes.h" +#include "zend_language_scanner.h" +#include "zend_inheritance.h" +#include "zend_hash.h" +#include "zend_modules.h" +#include "zend_arena.h" +#include "zend_exceptions.h" +#include "Optimizer/zend_optimizer.h" +#include "supplement.h" +#include + +int main(void) { + FILE *constants = fopen("constants.php", "w"); + FILE *layouts = fopen("layouts.json", "w"); + if (!constants || !layouts) { return 1; } + fputs(" %lld,\n", (long long)(ZEND_ACC_PUBLIC)); +#endif +#ifdef ZEND_ACC_PROTECTED + fprintf(constants, " 'ZEND_ACC_PROTECTED' => %lld,\n", (long long)(ZEND_ACC_PROTECTED)); +#endif +#ifdef ZEND_ACC_PRIVATE + fprintf(constants, " 'ZEND_ACC_PRIVATE' => %lld,\n", (long long)(ZEND_ACC_PRIVATE)); +#endif +#ifdef ZEND_ACC_CHANGED + fprintf(constants, " 'ZEND_ACC_CHANGED' => %lld,\n", (long long)(ZEND_ACC_CHANGED)); +#endif +#ifdef ZEND_ACC_STATIC + fprintf(constants, " 'ZEND_ACC_STATIC' => %lld,\n", (long long)(ZEND_ACC_STATIC)); +#endif +#ifdef ZEND_ACC_ABSTRACT + fprintf(constants, " 'ZEND_ACC_ABSTRACT' => %lld,\n", (long long)(ZEND_ACC_ABSTRACT)); +#endif +#ifdef ZEND_ACC_FINAL + fprintf(constants, " 'ZEND_ACC_FINAL' => %lld,\n", (long long)(ZEND_ACC_FINAL)); +#endif +#ifdef ZEND_ACC_DEPRECATED + fprintf(constants, " 'ZEND_ACC_DEPRECATED' => %lld,\n", (long long)(ZEND_ACC_DEPRECATED)); +#endif +#ifdef ZEND_ACC_INTERFACE + fprintf(constants, " 'ZEND_ACC_INTERFACE' => %lld,\n", (long long)(ZEND_ACC_INTERFACE)); +#endif +#ifdef ZEND_ACC_TRAIT + fprintf(constants, " 'ZEND_ACC_TRAIT' => %lld,\n", (long long)(ZEND_ACC_TRAIT)); +#endif +#ifdef ZEND_ACC_ANON_CLASS + fprintf(constants, " 'ZEND_ACC_ANON_CLASS' => %lld,\n", (long long)(ZEND_ACC_ANON_CLASS)); +#endif +#ifdef ZEND_ACC_ENUM + fprintf(constants, " 'ZEND_ACC_ENUM' => %lld,\n", (long long)(ZEND_ACC_ENUM)); +#endif +#ifdef ZEND_ACC_IMPLICIT_ABSTRACT_CLASS + fprintf(constants, " 'ZEND_ACC_IMPLICIT_ABSTRACT_CLASS' => %lld,\n", (long long)(ZEND_ACC_IMPLICIT_ABSTRACT_CLASS)); +#endif +#ifdef ZEND_ACC_LINKED + fprintf(constants, " 'ZEND_ACC_LINKED' => %lld,\n", (long long)(ZEND_ACC_LINKED)); +#endif +#ifdef ZEND_ACC_IMMUTABLE + fprintf(constants, " 'ZEND_ACC_IMMUTABLE' => %lld,\n", (long long)(ZEND_ACC_IMMUTABLE)); +#endif +#ifdef ZEND_ACC_USE_GUARDS + fprintf(constants, " 'ZEND_ACC_USE_GUARDS' => %lld,\n", (long long)(ZEND_ACC_USE_GUARDS)); +#endif +#ifdef ZEND_ACC_CONSTANTS_UPDATED + fprintf(constants, " 'ZEND_ACC_CONSTANTS_UPDATED' => %lld,\n", (long long)(ZEND_ACC_CONSTANTS_UPDATED)); +#endif +#ifdef ZEND_ACC_NO_DYNAMIC_PROPERTIES + fprintf(constants, " 'ZEND_ACC_NO_DYNAMIC_PROPERTIES' => %lld,\n", (long long)(ZEND_ACC_NO_DYNAMIC_PROPERTIES)); +#endif +#ifdef ZEND_ACC_HAS_STATIC_IN_METHODS + fprintf(constants, " 'ZEND_ACC_HAS_STATIC_IN_METHODS' => %lld,\n", (long long)(ZEND_ACC_HAS_STATIC_IN_METHODS)); +#endif +#ifdef ZEND_HAS_STATIC_IN_METHODS + fprintf(constants, " 'ZEND_HAS_STATIC_IN_METHODS' => %lld,\n", (long long)(ZEND_HAS_STATIC_IN_METHODS)); +#endif +#ifdef ZEND_ACC_TOP_LEVEL + fprintf(constants, " 'ZEND_ACC_TOP_LEVEL' => %lld,\n", (long long)(ZEND_ACC_TOP_LEVEL)); +#endif +#ifdef ZEND_ACC_PRELOADED + fprintf(constants, " 'ZEND_ACC_PRELOADED' => %lld,\n", (long long)(ZEND_ACC_PRELOADED)); +#endif +#ifdef ZEND_ACC_NOT_SERIALIZABLE + fprintf(constants, " 'ZEND_ACC_NOT_SERIALIZABLE' => %lld,\n", (long long)(ZEND_ACC_NOT_SERIALIZABLE)); +#endif +#ifdef ZEND_ACC_READONLY_CLASS + fprintf(constants, " 'ZEND_ACC_READONLY_CLASS' => %lld,\n", (long long)(ZEND_ACC_READONLY_CLASS)); +#endif +#ifdef ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES + fprintf(constants, " 'ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES' => %lld,\n", (long long)(ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES)); +#endif +#ifdef ZEND_ACC_UNRESOLVED_VARIANCE + fprintf(constants, " 'ZEND_ACC_UNRESOLVED_VARIANCE' => %lld,\n", (long long)(ZEND_ACC_UNRESOLVED_VARIANCE)); +#endif +#ifdef ZEND_ACC_NEARLY_LINKED + fprintf(constants, " 'ZEND_ACC_NEARLY_LINKED' => %lld,\n", (long long)(ZEND_ACC_NEARLY_LINKED)); +#endif +#ifdef ZEND_ACC_RESOLVED_PARENT + fprintf(constants, " 'ZEND_ACC_RESOLVED_PARENT' => %lld,\n", (long long)(ZEND_ACC_RESOLVED_PARENT)); +#endif +#ifdef ZEND_ACC_RESOLVED_INTERFACES + fprintf(constants, " 'ZEND_ACC_RESOLVED_INTERFACES' => %lld,\n", (long long)(ZEND_ACC_RESOLVED_INTERFACES)); +#endif +#ifdef ZEND_ACC_HAS_UNLINKED_USES + fprintf(constants, " 'ZEND_ACC_HAS_UNLINKED_USES' => %lld,\n", (long long)(ZEND_ACC_HAS_UNLINKED_USES)); +#endif +#ifdef ZEND_ACC_PROPERTY_TYPES_RESOLVED + fprintf(constants, " 'ZEND_ACC_PROPERTY_TYPES_RESOLVED' => %lld,\n", (long long)(ZEND_ACC_PROPERTY_TYPES_RESOLVED)); +#endif +#ifdef ZEND_ACC_REUSE_GET_ITERATOR + fprintf(constants, " 'ZEND_ACC_REUSE_GET_ITERATOR' => %lld,\n", (long long)(ZEND_ACC_REUSE_GET_ITERATOR)); +#endif +#ifdef ZEND_ACC_EXPLICIT_ABSTRACT_CLASS + fprintf(constants, " 'ZEND_ACC_EXPLICIT_ABSTRACT_CLASS' => %lld,\n", (long long)(ZEND_ACC_EXPLICIT_ABSTRACT_CLASS)); +#endif +#ifdef ZEND_ACC_READONLY + fprintf(constants, " 'ZEND_ACC_READONLY' => %lld,\n", (long long)(ZEND_ACC_READONLY)); +#endif +#ifdef ZEND_ACC_ABSTRACT_METHOD + fprintf(constants, " 'ZEND_ACC_ABSTRACT_METHOD' => %lld,\n", (long long)(ZEND_ACC_ABSTRACT_METHOD)); +#endif +#ifdef ZEND_ACC_VIRTUAL + fprintf(constants, " 'ZEND_ACC_VIRTUAL' => %lld,\n", (long long)(ZEND_ACC_VIRTUAL)); +#endif +#ifdef ZEND_ACC_FAKE_CLOSURE + fprintf(constants, " 'ZEND_ACC_FAKE_CLOSURE' => %lld,\n", (long long)(ZEND_ACC_FAKE_CLOSURE)); +#endif +#ifdef ZEND_ACC_UNINSTANTIABLE + fprintf(constants, " 'ZEND_ACC_UNINSTANTIABLE' => %lld,\n", (long long)(ZEND_ACC_UNINSTANTIABLE)); +#endif +#ifdef ZEND_ACC_CALL_VIA_TRAMPOLINE + fprintf(constants, " 'ZEND_ACC_CALL_VIA_TRAMPOLINE' => %lld,\n", (long long)(ZEND_ACC_CALL_VIA_TRAMPOLINE)); +#endif +#ifdef ZEND_ACC_NEVER_CACHE + fprintf(constants, " 'ZEND_ACC_NEVER_CACHE' => %lld,\n", (long long)(ZEND_ACC_NEVER_CACHE)); +#endif +#ifdef ZEND_ACC_TRAIT_CLONE + fprintf(constants, " 'ZEND_ACC_TRAIT_CLONE' => %lld,\n", (long long)(ZEND_ACC_TRAIT_CLONE)); +#endif +#ifdef ZEND_ACC_RETURN_REFERENCE + fprintf(constants, " 'ZEND_ACC_RETURN_REFERENCE' => %lld,\n", (long long)(ZEND_ACC_RETURN_REFERENCE)); +#endif +#ifdef ZEND_ACC_DONE_PASS_TWO + fprintf(constants, " 'ZEND_ACC_DONE_PASS_TWO' => %lld,\n", (long long)(ZEND_ACC_DONE_PASS_TWO)); +#endif +#ifdef ZEND_ACC_HEAP_RT_CACHE + fprintf(constants, " 'ZEND_ACC_HEAP_RT_CACHE' => %lld,\n", (long long)(ZEND_ACC_HEAP_RT_CACHE)); +#endif +#ifdef ZEND_ACC_STRICT_TYPES + fprintf(constants, " 'ZEND_ACC_STRICT_TYPES' => %lld,\n", (long long)(ZEND_ACC_STRICT_TYPES)); +#endif +#ifdef ZEND_ACC_CLOSURE + fprintf(constants, " 'ZEND_ACC_CLOSURE' => %lld,\n", (long long)(ZEND_ACC_CLOSURE)); +#endif +#ifdef ZEND_ACC_GENERATOR + fprintf(constants, " 'ZEND_ACC_GENERATOR' => %lld,\n", (long long)(ZEND_ACC_GENERATOR)); +#endif +#ifdef ZEND_ACC_HAS_FINALLY_BLOCK + fprintf(constants, " 'ZEND_ACC_HAS_FINALLY_BLOCK' => %lld,\n", (long long)(ZEND_ACC_HAS_FINALLY_BLOCK)); +#endif +#ifdef ZEND_ACC_EARLY_BINDING + fprintf(constants, " 'ZEND_ACC_EARLY_BINDING' => %lld,\n", (long long)(ZEND_ACC_EARLY_BINDING)); +#endif +#ifdef ZEND_ACC_USES_THIS + fprintf(constants, " 'ZEND_ACC_USES_THIS' => %lld,\n", (long long)(ZEND_ACC_USES_THIS)); +#endif +#ifdef ZEND_ACC_CTOR + fprintf(constants, " 'ZEND_ACC_CTOR' => %lld,\n", (long long)(ZEND_ACC_CTOR)); +#endif +#ifdef ZEND_ACC_HAS_TYPE_HINTS + fprintf(constants, " 'ZEND_ACC_HAS_TYPE_HINTS' => %lld,\n", (long long)(ZEND_ACC_HAS_TYPE_HINTS)); +#endif +#ifdef ZEND_ACC_HAS_RETURN_TYPE + fprintf(constants, " 'ZEND_ACC_HAS_RETURN_TYPE' => %lld,\n", (long long)(ZEND_ACC_HAS_RETURN_TYPE)); +#endif +#ifdef ZEND_ACC_VARIADIC + fprintf(constants, " 'ZEND_ACC_VARIADIC' => %lld,\n", (long long)(ZEND_ACC_VARIADIC)); +#endif +#ifdef ZEND_ACC_HAS_UNRESOLVED_INITIALIZERS + fprintf(constants, " 'ZEND_ACC_HAS_UNRESOLVED_INITIALIZERS' => %lld,\n", (long long)(ZEND_ACC_HAS_UNRESOLVED_INITIALIZERS)); +#endif +#ifdef ZEND_ACC_CACHED + fprintf(constants, " 'ZEND_ACC_CACHED' => %lld,\n", (long long)(ZEND_ACC_CACHED)); +#endif +#ifdef ZEND_ACC_FILE_CACHED + fprintf(constants, " 'ZEND_ACC_FILE_CACHED' => %lld,\n", (long long)(ZEND_ACC_FILE_CACHED)); +#endif +#ifdef ZEND_ACC_ARENA_ALLOCATED + fprintf(constants, " 'ZEND_ACC_ARENA_ALLOCATED' => %lld,\n", (long long)(ZEND_ACC_ARENA_ALLOCATED)); +#endif +#ifdef _ZEND_TYPE_EXTRA_FLAGS_SHIFT + fprintf(constants, " '_ZEND_TYPE_EXTRA_FLAGS_SHIFT' => %lld,\n", (long long)(_ZEND_TYPE_EXTRA_FLAGS_SHIFT)); +#endif +#ifdef _ZEND_TYPE_MASK + fprintf(constants, " '_ZEND_TYPE_MASK' => %lld,\n", (long long)(_ZEND_TYPE_MASK)); +#endif +#ifdef _ZEND_TYPE_NAME_BIT + fprintf(constants, " '_ZEND_TYPE_NAME_BIT' => %lld,\n", (long long)(_ZEND_TYPE_NAME_BIT)); +#endif +#ifdef _ZEND_TYPE_LITERAL_NAME_BIT + fprintf(constants, " '_ZEND_TYPE_LITERAL_NAME_BIT' => %lld,\n", (long long)(_ZEND_TYPE_LITERAL_NAME_BIT)); +#endif +#ifdef _ZEND_TYPE_LIST_BIT + fprintf(constants, " '_ZEND_TYPE_LIST_BIT' => %lld,\n", (long long)(_ZEND_TYPE_LIST_BIT)); +#endif +#ifdef _ZEND_TYPE_KIND_MASK + fprintf(constants, " '_ZEND_TYPE_KIND_MASK' => %lld,\n", (long long)(_ZEND_TYPE_KIND_MASK)); +#endif +#ifdef _ZEND_TYPE_ITERABLE_BIT + fprintf(constants, " '_ZEND_TYPE_ITERABLE_BIT' => %lld,\n", (long long)(_ZEND_TYPE_ITERABLE_BIT)); +#endif +#ifdef _ZEND_TYPE_ARENA_BIT + fprintf(constants, " '_ZEND_TYPE_ARENA_BIT' => %lld,\n", (long long)(_ZEND_TYPE_ARENA_BIT)); +#endif +#ifdef _ZEND_TYPE_INTERSECTION_BIT + fprintf(constants, " '_ZEND_TYPE_INTERSECTION_BIT' => %lld,\n", (long long)(_ZEND_TYPE_INTERSECTION_BIT)); +#endif +#ifdef _ZEND_TYPE_UNION_BIT + fprintf(constants, " '_ZEND_TYPE_UNION_BIT' => %lld,\n", (long long)(_ZEND_TYPE_UNION_BIT)); +#endif +#ifdef _ZEND_TYPE_NULLABLE_BIT + fprintf(constants, " '_ZEND_TYPE_NULLABLE_BIT' => %lld,\n", (long long)(_ZEND_TYPE_NULLABLE_BIT)); +#endif +#ifdef _ZEND_TYPE_MAY_BE_MASK + fprintf(constants, " '_ZEND_TYPE_MAY_BE_MASK' => %lld,\n", (long long)(_ZEND_TYPE_MAY_BE_MASK)); +#endif +#ifdef IS_UNDEF + fprintf(constants, " 'IS_UNDEF' => %lld,\n", (long long)(IS_UNDEF)); +#endif +#ifdef IS_NULL + fprintf(constants, " 'IS_NULL' => %lld,\n", (long long)(IS_NULL)); +#endif +#ifdef IS_FALSE + fprintf(constants, " 'IS_FALSE' => %lld,\n", (long long)(IS_FALSE)); +#endif +#ifdef IS_TRUE + fprintf(constants, " 'IS_TRUE' => %lld,\n", (long long)(IS_TRUE)); +#endif +#ifdef IS_LONG + fprintf(constants, " 'IS_LONG' => %lld,\n", (long long)(IS_LONG)); +#endif +#ifdef IS_DOUBLE + fprintf(constants, " 'IS_DOUBLE' => %lld,\n", (long long)(IS_DOUBLE)); +#endif +#ifdef IS_STRING + fprintf(constants, " 'IS_STRING' => %lld,\n", (long long)(IS_STRING)); +#endif +#ifdef IS_ARRAY + fprintf(constants, " 'IS_ARRAY' => %lld,\n", (long long)(IS_ARRAY)); +#endif +#ifdef IS_OBJECT + fprintf(constants, " 'IS_OBJECT' => %lld,\n", (long long)(IS_OBJECT)); +#endif +#ifdef IS_RESOURCE + fprintf(constants, " 'IS_RESOURCE' => %lld,\n", (long long)(IS_RESOURCE)); +#endif +#ifdef IS_REFERENCE + fprintf(constants, " 'IS_REFERENCE' => %lld,\n", (long long)(IS_REFERENCE)); +#endif +#ifdef IS_CONSTANT_AST + fprintf(constants, " 'IS_CONSTANT_AST' => %lld,\n", (long long)(IS_CONSTANT_AST)); +#endif +#ifdef IS_CALLABLE + fprintf(constants, " 'IS_CALLABLE' => %lld,\n", (long long)(IS_CALLABLE)); +#endif +#ifdef IS_ITERABLE + fprintf(constants, " 'IS_ITERABLE' => %lld,\n", (long long)(IS_ITERABLE)); +#endif +#ifdef IS_VOID + fprintf(constants, " 'IS_VOID' => %lld,\n", (long long)(IS_VOID)); +#endif +#ifdef IS_STATIC + fprintf(constants, " 'IS_STATIC' => %lld,\n", (long long)(IS_STATIC)); +#endif +#ifdef IS_MIXED + fprintf(constants, " 'IS_MIXED' => %lld,\n", (long long)(IS_MIXED)); +#endif +#ifdef IS_NEVER + fprintf(constants, " 'IS_NEVER' => %lld,\n", (long long)(IS_NEVER)); +#endif +#ifdef IS_INDIRECT + fprintf(constants, " 'IS_INDIRECT' => %lld,\n", (long long)(IS_INDIRECT)); +#endif +#ifdef IS_PTR + fprintf(constants, " 'IS_PTR' => %lld,\n", (long long)(IS_PTR)); +#endif +#ifdef IS_ALIAS_PTR + fprintf(constants, " 'IS_ALIAS_PTR' => %lld,\n", (long long)(IS_ALIAS_PTR)); +#endif +#ifdef _IS_ERROR + fprintf(constants, " '_IS_ERROR' => %lld,\n", (long long)(_IS_ERROR)); +#endif +#ifdef _IS_BOOL + fprintf(constants, " '_IS_BOOL' => %lld,\n", (long long)(_IS_BOOL)); +#endif +#ifdef _IS_NUMBER + fprintf(constants, " '_IS_NUMBER' => %lld,\n", (long long)(_IS_NUMBER)); +#endif +#ifdef IS_TYPE_REFCOUNTED + fprintf(constants, " 'IS_TYPE_REFCOUNTED' => %lld,\n", (long long)(IS_TYPE_REFCOUNTED)); +#endif +#ifdef IS_TYPE_COLLECTABLE + fprintf(constants, " 'IS_TYPE_COLLECTABLE' => %lld,\n", (long long)(IS_TYPE_COLLECTABLE)); +#endif +#ifdef Z_TYPE_MASK + fprintf(constants, " 'Z_TYPE_MASK' => %lld,\n", (long long)(Z_TYPE_MASK)); +#endif +#ifdef Z_TYPE_FLAGS_MASK + fprintf(constants, " 'Z_TYPE_FLAGS_MASK' => %lld,\n", (long long)(Z_TYPE_FLAGS_MASK)); +#endif +#ifdef Z_TYPE_FLAGS_SHIFT + fprintf(constants, " 'Z_TYPE_FLAGS_SHIFT' => %lld,\n", (long long)(Z_TYPE_FLAGS_SHIFT)); +#endif +#ifdef GC_TYPE_MASK + fprintf(constants, " 'GC_TYPE_MASK' => %lld,\n", (long long)(GC_TYPE_MASK)); +#endif +#ifdef GC_FLAGS_MASK + fprintf(constants, " 'GC_FLAGS_MASK' => %lld,\n", (long long)(GC_FLAGS_MASK)); +#endif +#ifdef GC_INFO_MASK + fprintf(constants, " 'GC_INFO_MASK' => %lld,\n", (long long)(GC_INFO_MASK)); +#endif +#ifdef GC_FLAGS_SHIFT + fprintf(constants, " 'GC_FLAGS_SHIFT' => %lld,\n", (long long)(GC_FLAGS_SHIFT)); +#endif +#ifdef GC_INFO_SHIFT + fprintf(constants, " 'GC_INFO_SHIFT' => %lld,\n", (long long)(GC_INFO_SHIFT)); +#endif +#ifdef GC_NULL + fprintf(constants, " 'GC_NULL' => %lld,\n", (long long)(GC_NULL)); +#endif +#ifdef GC_STRING + fprintf(constants, " 'GC_STRING' => %lld,\n", (long long)(GC_STRING)); +#endif +#ifdef GC_ARRAY + fprintf(constants, " 'GC_ARRAY' => %lld,\n", (long long)(GC_ARRAY)); +#endif +#ifdef GC_OBJECT + fprintf(constants, " 'GC_OBJECT' => %lld,\n", (long long)(GC_OBJECT)); +#endif +#ifdef GC_RESOURCE + fprintf(constants, " 'GC_RESOURCE' => %lld,\n", (long long)(GC_RESOURCE)); +#endif +#ifdef GC_REFERENCE + fprintf(constants, " 'GC_REFERENCE' => %lld,\n", (long long)(GC_REFERENCE)); +#endif +#ifdef GC_CONSTANT_AST + fprintf(constants, " 'GC_CONSTANT_AST' => %lld,\n", (long long)(GC_CONSTANT_AST)); +#endif +#ifdef GC_NOT_COLLECTABLE + fprintf(constants, " 'GC_NOT_COLLECTABLE' => %lld,\n", (long long)(GC_NOT_COLLECTABLE)); +#endif +#ifdef GC_PROTECTED + fprintf(constants, " 'GC_PROTECTED' => %lld,\n", (long long)(GC_PROTECTED)); +#endif +#ifdef GC_IMMUTABLE + fprintf(constants, " 'GC_IMMUTABLE' => %lld,\n", (long long)(GC_IMMUTABLE)); +#endif +#ifdef GC_PERSISTENT + fprintf(constants, " 'GC_PERSISTENT' => %lld,\n", (long long)(GC_PERSISTENT)); +#endif +#ifdef GC_PERSISTENT_LOCAL + fprintf(constants, " 'GC_PERSISTENT_LOCAL' => %lld,\n", (long long)(GC_PERSISTENT_LOCAL)); +#endif +#ifdef IS_STR_CLASS_NAME_MAP_PTR + fprintf(constants, " 'IS_STR_CLASS_NAME_MAP_PTR' => %lld,\n", (long long)(IS_STR_CLASS_NAME_MAP_PTR)); +#endif +#ifdef IS_STR_INTERNED + fprintf(constants, " 'IS_STR_INTERNED' => %lld,\n", (long long)(IS_STR_INTERNED)); +#endif +#ifdef IS_STR_PERSISTENT + fprintf(constants, " 'IS_STR_PERSISTENT' => %lld,\n", (long long)(IS_STR_PERSISTENT)); +#endif +#ifdef IS_STR_PERMANENT + fprintf(constants, " 'IS_STR_PERMANENT' => %lld,\n", (long long)(IS_STR_PERMANENT)); +#endif +#ifdef IS_STR_VALID_UTF8 + fprintf(constants, " 'IS_STR_VALID_UTF8' => %lld,\n", (long long)(IS_STR_VALID_UTF8)); +#endif +#ifdef IS_ARRAY_IMMUTABLE + fprintf(constants, " 'IS_ARRAY_IMMUTABLE' => %lld,\n", (long long)(IS_ARRAY_IMMUTABLE)); +#endif +#ifdef IS_ARRAY_PERSISTENT + fprintf(constants, " 'IS_ARRAY_PERSISTENT' => %lld,\n", (long long)(IS_ARRAY_PERSISTENT)); +#endif +#ifdef IS_OBJ_WEAKLY_REFERENCED + fprintf(constants, " 'IS_OBJ_WEAKLY_REFERENCED' => %lld,\n", (long long)(IS_OBJ_WEAKLY_REFERENCED)); +#endif +#ifdef IS_OBJ_DESTRUCTOR_CALLED + fprintf(constants, " 'IS_OBJ_DESTRUCTOR_CALLED' => %lld,\n", (long long)(IS_OBJ_DESTRUCTOR_CALLED)); +#endif +#ifdef IS_OBJ_FREE_CALLED + fprintf(constants, " 'IS_OBJ_FREE_CALLED' => %lld,\n", (long long)(IS_OBJ_FREE_CALLED)); +#endif +#ifdef IS_OBJ_LAZY_UNINITIALIZED + fprintf(constants, " 'IS_OBJ_LAZY_UNINITIALIZED' => %lld,\n", (long long)(IS_OBJ_LAZY_UNINITIALIZED)); +#endif +#ifdef IS_OBJ_LAZY_PROXY + fprintf(constants, " 'IS_OBJ_LAZY_PROXY' => %lld,\n", (long long)(IS_OBJ_LAZY_PROXY)); +#endif +#ifdef HASH_FLAG_CONSISTENCY + fprintf(constants, " 'HASH_FLAG_CONSISTENCY' => %lld,\n", (long long)(HASH_FLAG_CONSISTENCY)); +#endif +#ifdef HASH_FLAG_PACKED + fprintf(constants, " 'HASH_FLAG_PACKED' => %lld,\n", (long long)(HASH_FLAG_PACKED)); +#endif +#ifdef HASH_FLAG_UNINITIALIZED + fprintf(constants, " 'HASH_FLAG_UNINITIALIZED' => %lld,\n", (long long)(HASH_FLAG_UNINITIALIZED)); +#endif +#ifdef HASH_FLAG_STATIC_KEYS + fprintf(constants, " 'HASH_FLAG_STATIC_KEYS' => %lld,\n", (long long)(HASH_FLAG_STATIC_KEYS)); +#endif +#ifdef HASH_FLAG_HAS_EMPTY_IND + fprintf(constants, " 'HASH_FLAG_HAS_EMPTY_IND' => %lld,\n", (long long)(HASH_FLAG_HAS_EMPTY_IND)); +#endif +#ifdef HASH_FLAG_ALLOW_COW_VIOLATION + fprintf(constants, " 'HASH_FLAG_ALLOW_COW_VIOLATION' => %lld,\n", (long long)(HASH_FLAG_ALLOW_COW_VIOLATION)); +#endif +#ifdef HASH_UPDATE + fprintf(constants, " 'HASH_UPDATE' => %lld,\n", (long long)(HASH_UPDATE)); +#endif +#ifdef HASH_ADD + fprintf(constants, " 'HASH_ADD' => %lld,\n", (long long)(HASH_ADD)); +#endif +#ifdef HASH_UPDATE_INDIRECT + fprintf(constants, " 'HASH_UPDATE_INDIRECT' => %lld,\n", (long long)(HASH_UPDATE_INDIRECT)); +#endif +#ifdef HASH_ADD_NEW + fprintf(constants, " 'HASH_ADD_NEW' => %lld,\n", (long long)(HASH_ADD_NEW)); +#endif +#ifdef HASH_ADD_NEXT + fprintf(constants, " 'HASH_ADD_NEXT' => %lld,\n", (long long)(HASH_ADD_NEXT)); +#endif +#ifdef HT_MIN_MASK + fprintf(constants, " 'HT_MIN_MASK' => %lld,\n", (long long)(HT_MIN_MASK)); +#endif +#ifdef HT_MIN_SIZE + fprintf(constants, " 'HT_MIN_SIZE' => %lld,\n", (long long)(HT_MIN_SIZE)); +#endif +#ifdef ZEND_MODULE_API_NO + fprintf(constants, " 'ZEND_MODULE_API_NO' => %lld,\n", (long long)(ZEND_MODULE_API_NO)); +#endif +#ifdef MODULE_PERSISTENT + fprintf(constants, " 'MODULE_PERSISTENT' => %lld,\n", (long long)(MODULE_PERSISTENT)); +#endif +#ifdef MODULE_TEMPORARY + fprintf(constants, " 'MODULE_TEMPORARY' => %lld,\n", (long long)(MODULE_TEMPORARY)); +#endif +#ifdef CONST_CS + fprintf(constants, " 'CONST_CS' => %lld,\n", (long long)(CONST_CS)); +#endif +#ifdef CONST_PERSISTENT + fprintf(constants, " 'CONST_PERSISTENT' => %lld,\n", (long long)(CONST_PERSISTENT)); +#endif +#ifdef CONST_NO_FILE_CACHE + fprintf(constants, " 'CONST_NO_FILE_CACHE' => %lld,\n", (long long)(CONST_NO_FILE_CACHE)); +#endif +#ifdef CONST_DEPRECATED + fprintf(constants, " 'CONST_DEPRECATED' => %lld,\n", (long long)(CONST_DEPRECATED)); +#endif +#ifdef CONST_OWNED + fprintf(constants, " 'CONST_OWNED' => %lld,\n", (long long)(CONST_OWNED)); +#endif +#ifdef CONST_RECURSIVE + fprintf(constants, " 'CONST_RECURSIVE' => %lld,\n", (long long)(CONST_RECURSIVE)); +#endif +#ifdef PHP_USER_CONSTANT + fprintf(constants, " 'PHP_USER_CONSTANT' => %lld,\n", (long long)(PHP_USER_CONSTANT)); +#endif +#ifdef ZEND_DEBUG + fprintf(constants, " 'ZEND_DEBUG' => %lld,\n", (long long)(ZEND_DEBUG)); +#endif +#ifdef ZEND_MM_ALIGNMENT + fprintf(constants, " 'ZEND_MM_ALIGNMENT' => %lld,\n", (long long)(ZEND_MM_ALIGNMENT)); +#endif +#ifdef ZEND_MAX_RESERVED_RESOURCES + fprintf(constants, " 'ZEND_MAX_RESERVED_RESOURCES' => %lld,\n", (long long)(ZEND_MAX_RESERVED_RESOURCES)); +#endif +#ifdef ZEND_INTERNAL_FUNCTION + fprintf(constants, " 'ZEND_INTERNAL_FUNCTION' => %lld,\n", (long long)(ZEND_INTERNAL_FUNCTION)); +#endif +#ifdef ZEND_USER_FUNCTION + fprintf(constants, " 'ZEND_USER_FUNCTION' => %lld,\n", (long long)(ZEND_USER_FUNCTION)); +#endif +#ifdef ZEND_EVAL_CODE + fprintf(constants, " 'ZEND_EVAL_CODE' => %lld,\n", (long long)(ZEND_EVAL_CODE)); +#endif +#ifdef ZEND_COMPILE_EXTENDED_STMT + fprintf(constants, " 'ZEND_COMPILE_EXTENDED_STMT' => %lld,\n", (long long)(ZEND_COMPILE_EXTENDED_STMT)); +#endif +#ifdef ZEND_COMPILE_EXTENDED_FCALL + fprintf(constants, " 'ZEND_COMPILE_EXTENDED_FCALL' => %lld,\n", (long long)(ZEND_COMPILE_EXTENDED_FCALL)); +#endif +#ifdef ZEND_COMPILE_EXTENDED_INFO + fprintf(constants, " 'ZEND_COMPILE_EXTENDED_INFO' => %lld,\n", (long long)(ZEND_COMPILE_EXTENDED_INFO)); +#endif +#ifdef ZEND_COMPILE_HANDLE_OP_ARRAY + fprintf(constants, " 'ZEND_COMPILE_HANDLE_OP_ARRAY' => %lld,\n", (long long)(ZEND_COMPILE_HANDLE_OP_ARRAY)); +#endif +#ifdef ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS + fprintf(constants, " 'ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS' => %lld,\n", (long long)(ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS)); +#endif +#ifdef ZEND_COMPILE_DELAYED_BINDING + fprintf(constants, " 'ZEND_COMPILE_DELAYED_BINDING' => %lld,\n", (long long)(ZEND_COMPILE_DELAYED_BINDING)); +#endif +#ifdef ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION + fprintf(constants, " 'ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION' => %lld,\n", (long long)(ZEND_COMPILE_NO_CONSTANT_SUBSTITUTION)); +#endif +#ifdef ZEND_COMPILE_IGNORE_INTERNAL_CLASSES + fprintf(constants, " 'ZEND_COMPILE_IGNORE_INTERNAL_CLASSES' => %lld,\n", (long long)(ZEND_COMPILE_IGNORE_INTERNAL_CLASSES)); +#endif +#ifdef ZEND_COMPILE_IGNORE_USER_FUNCTIONS + fprintf(constants, " 'ZEND_COMPILE_IGNORE_USER_FUNCTIONS' => %lld,\n", (long long)(ZEND_COMPILE_IGNORE_USER_FUNCTIONS)); +#endif +#ifdef ZEND_COMPILE_GUARDS + fprintf(constants, " 'ZEND_COMPILE_GUARDS' => %lld,\n", (long long)(ZEND_COMPILE_GUARDS)); +#endif +#ifdef ZEND_COMPILE_NO_BUILTINS + fprintf(constants, " 'ZEND_COMPILE_NO_BUILTINS' => %lld,\n", (long long)(ZEND_COMPILE_NO_BUILTINS)); +#endif +#ifdef ZEND_COMPILE_NO_JUMPTABLES + fprintf(constants, " 'ZEND_COMPILE_NO_JUMPTABLES' => %lld,\n", (long long)(ZEND_COMPILE_NO_JUMPTABLES)); +#endif +#ifdef ZEND_COMPILE_PRELOAD + fprintf(constants, " 'ZEND_COMPILE_PRELOAD' => %lld,\n", (long long)(ZEND_COMPILE_PRELOAD)); +#endif +#ifdef ZEND_COMPILE_PRELOAD_IN_CHILD + fprintf(constants, " 'ZEND_COMPILE_PRELOAD_IN_CHILD' => %lld,\n", (long long)(ZEND_COMPILE_PRELOAD_IN_CHILD)); +#endif +#ifdef ZEND_COMPILE_WITHOUT_EXECUTION + fprintf(constants, " 'ZEND_COMPILE_WITHOUT_EXECUTION' => %lld,\n", (long long)(ZEND_COMPILE_WITHOUT_EXECUTION)); +#endif +#ifdef ZEND_CALL_FUNCTION + fprintf(constants, " 'ZEND_CALL_FUNCTION' => %lld,\n", (long long)(ZEND_CALL_FUNCTION)); +#endif +#ifdef ZEND_CALL_CODE + fprintf(constants, " 'ZEND_CALL_CODE' => %lld,\n", (long long)(ZEND_CALL_CODE)); +#endif +#ifdef ZEND_CALL_NESTED + fprintf(constants, " 'ZEND_CALL_NESTED' => %lld,\n", (long long)(ZEND_CALL_NESTED)); +#endif +#ifdef ZEND_CALL_TOP + fprintf(constants, " 'ZEND_CALL_TOP' => %lld,\n", (long long)(ZEND_CALL_TOP)); +#endif +#ifdef ZEND_CALL_HAS_THIS + fprintf(constants, " 'ZEND_CALL_HAS_THIS' => %lld,\n", (long long)(ZEND_CALL_HAS_THIS)); +#endif +#ifdef ZEND_CALL_FAKE_CLOSURE + fprintf(constants, " 'ZEND_CALL_FAKE_CLOSURE' => %lld,\n", (long long)(ZEND_CALL_FAKE_CLOSURE)); +#endif +#ifdef ZEND_CALL_CLOSURE + fprintf(constants, " 'ZEND_CALL_CLOSURE' => %lld,\n", (long long)(ZEND_CALL_CLOSURE)); +#endif +#ifdef ZEND_CALL_HAS_SYMBOL_TABLE + fprintf(constants, " 'ZEND_CALL_HAS_SYMBOL_TABLE' => %lld,\n", (long long)(ZEND_CALL_HAS_SYMBOL_TABLE)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_CLASS + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_CLASS' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_CLASS)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_FUNCTION + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_FUNCTION' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_FUNCTION)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_METHOD + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_METHOD' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_METHOD)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_PROPERTY + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_PROPERTY' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_PROPERTY)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_CLASS_CONST + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_CLASS_CONST' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_CLASS_CONST)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_PARAMETER + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_PARAMETER' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_PARAMETER)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_CONST + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_CONST' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_CONST)); +#endif +#ifdef ZEND_ATTRIBUTE_TARGET_ALL + fprintf(constants, " 'ZEND_ATTRIBUTE_TARGET_ALL' => %lld,\n", (long long)(ZEND_ATTRIBUTE_TARGET_ALL)); +#endif +#ifdef ZEND_ATTRIBUTE_IS_REPEATABLE + fprintf(constants, " 'ZEND_ATTRIBUTE_IS_REPEATABLE' => %lld,\n", (long long)(ZEND_ATTRIBUTE_IS_REPEATABLE)); +#endif +#ifdef ZEND_ATTRIBUTE_FLAGS + fprintf(constants, " 'ZEND_ATTRIBUTE_FLAGS' => %lld,\n", (long long)(ZEND_ATTRIBUTE_FLAGS)); +#endif + fprintf(constants, " 'ZEND_AST_ZVAL' => %lld,\n", (long long)(ZEND_AST_ZVAL)); + fprintf(constants, " 'ZEND_AST_CONSTANT' => %lld,\n", (long long)(ZEND_AST_CONSTANT)); + fprintf(constants, " 'ZEND_AST_OP_ARRAY' => %lld,\n", (long long)(ZEND_AST_OP_ARRAY)); + fprintf(constants, " 'ZEND_AST_ZNODE' => %lld,\n", (long long)(ZEND_AST_ZNODE)); + fprintf(constants, " 'ZEND_AST_FUNC_DECL' => %lld,\n", (long long)(ZEND_AST_FUNC_DECL)); + fprintf(constants, " 'ZEND_AST_CLOSURE' => %lld,\n", (long long)(ZEND_AST_CLOSURE)); + fprintf(constants, " 'ZEND_AST_METHOD' => %lld,\n", (long long)(ZEND_AST_METHOD)); + fprintf(constants, " 'ZEND_AST_CLASS' => %lld,\n", (long long)(ZEND_AST_CLASS)); + fprintf(constants, " 'ZEND_AST_ARROW_FUNC' => %lld,\n", (long long)(ZEND_AST_ARROW_FUNC)); + fprintf(constants, " 'ZEND_AST_PROPERTY_HOOK' => %lld,\n", (long long)(ZEND_AST_PROPERTY_HOOK)); + fprintf(constants, " 'ZEND_AST_ARG_LIST' => %lld,\n", (long long)(ZEND_AST_ARG_LIST)); + fprintf(constants, " 'ZEND_AST_ARRAY' => %lld,\n", (long long)(ZEND_AST_ARRAY)); + fprintf(constants, " 'ZEND_AST_ENCAPS_LIST' => %lld,\n", (long long)(ZEND_AST_ENCAPS_LIST)); + fprintf(constants, " 'ZEND_AST_EXPR_LIST' => %lld,\n", (long long)(ZEND_AST_EXPR_LIST)); + fprintf(constants, " 'ZEND_AST_STMT_LIST' => %lld,\n", (long long)(ZEND_AST_STMT_LIST)); + fprintf(constants, " 'ZEND_AST_IF' => %lld,\n", (long long)(ZEND_AST_IF)); + fprintf(constants, " 'ZEND_AST_SWITCH_LIST' => %lld,\n", (long long)(ZEND_AST_SWITCH_LIST)); + fprintf(constants, " 'ZEND_AST_CATCH_LIST' => %lld,\n", (long long)(ZEND_AST_CATCH_LIST)); + fprintf(constants, " 'ZEND_AST_PARAM_LIST' => %lld,\n", (long long)(ZEND_AST_PARAM_LIST)); + fprintf(constants, " 'ZEND_AST_CLOSURE_USES' => %lld,\n", (long long)(ZEND_AST_CLOSURE_USES)); + fprintf(constants, " 'ZEND_AST_PROP_DECL' => %lld,\n", (long long)(ZEND_AST_PROP_DECL)); + fprintf(constants, " 'ZEND_AST_CONST_DECL' => %lld,\n", (long long)(ZEND_AST_CONST_DECL)); + fprintf(constants, " 'ZEND_AST_CLASS_CONST_DECL' => %lld,\n", (long long)(ZEND_AST_CLASS_CONST_DECL)); + fprintf(constants, " 'ZEND_AST_NAME_LIST' => %lld,\n", (long long)(ZEND_AST_NAME_LIST)); + fprintf(constants, " 'ZEND_AST_TRAIT_ADAPTATIONS' => %lld,\n", (long long)(ZEND_AST_TRAIT_ADAPTATIONS)); + fprintf(constants, " 'ZEND_AST_USE' => %lld,\n", (long long)(ZEND_AST_USE)); + fprintf(constants, " 'ZEND_AST_TYPE_UNION' => %lld,\n", (long long)(ZEND_AST_TYPE_UNION)); + fprintf(constants, " 'ZEND_AST_TYPE_INTERSECTION' => %lld,\n", (long long)(ZEND_AST_TYPE_INTERSECTION)); + fprintf(constants, " 'ZEND_AST_ATTRIBUTE_LIST' => %lld,\n", (long long)(ZEND_AST_ATTRIBUTE_LIST)); + fprintf(constants, " 'ZEND_AST_ATTRIBUTE_GROUP' => %lld,\n", (long long)(ZEND_AST_ATTRIBUTE_GROUP)); + fprintf(constants, " 'ZEND_AST_MATCH_ARM_LIST' => %lld,\n", (long long)(ZEND_AST_MATCH_ARM_LIST)); + fprintf(constants, " 'ZEND_AST_MODIFIER_LIST' => %lld,\n", (long long)(ZEND_AST_MODIFIER_LIST)); + fprintf(constants, " 'ZEND_AST_MAGIC_CONST' => %lld,\n", (long long)(ZEND_AST_MAGIC_CONST)); + fprintf(constants, " 'ZEND_AST_TYPE' => %lld,\n", (long long)(ZEND_AST_TYPE)); + fprintf(constants, " 'ZEND_AST_CONSTANT_CLASS' => %lld,\n", (long long)(ZEND_AST_CONSTANT_CLASS)); + fprintf(constants, " 'ZEND_AST_CALLABLE_CONVERT' => %lld,\n", (long long)(ZEND_AST_CALLABLE_CONVERT)); + fprintf(constants, " 'ZEND_AST_VAR' => %lld,\n", (long long)(ZEND_AST_VAR)); + fprintf(constants, " 'ZEND_AST_CONST' => %lld,\n", (long long)(ZEND_AST_CONST)); + fprintf(constants, " 'ZEND_AST_UNPACK' => %lld,\n", (long long)(ZEND_AST_UNPACK)); + fprintf(constants, " 'ZEND_AST_UNARY_PLUS' => %lld,\n", (long long)(ZEND_AST_UNARY_PLUS)); + fprintf(constants, " 'ZEND_AST_UNARY_MINUS' => %lld,\n", (long long)(ZEND_AST_UNARY_MINUS)); + fprintf(constants, " 'ZEND_AST_CAST' => %lld,\n", (long long)(ZEND_AST_CAST)); + fprintf(constants, " 'ZEND_AST_CAST_VOID' => %lld,\n", (long long)(ZEND_AST_CAST_VOID)); + fprintf(constants, " 'ZEND_AST_EMPTY' => %lld,\n", (long long)(ZEND_AST_EMPTY)); + fprintf(constants, " 'ZEND_AST_ISSET' => %lld,\n", (long long)(ZEND_AST_ISSET)); + fprintf(constants, " 'ZEND_AST_SILENCE' => %lld,\n", (long long)(ZEND_AST_SILENCE)); + fprintf(constants, " 'ZEND_AST_SHELL_EXEC' => %lld,\n", (long long)(ZEND_AST_SHELL_EXEC)); + fprintf(constants, " 'ZEND_AST_PRINT' => %lld,\n", (long long)(ZEND_AST_PRINT)); + fprintf(constants, " 'ZEND_AST_INCLUDE_OR_EVAL' => %lld,\n", (long long)(ZEND_AST_INCLUDE_OR_EVAL)); + fprintf(constants, " 'ZEND_AST_UNARY_OP' => %lld,\n", (long long)(ZEND_AST_UNARY_OP)); + fprintf(constants, " 'ZEND_AST_PRE_INC' => %lld,\n", (long long)(ZEND_AST_PRE_INC)); + fprintf(constants, " 'ZEND_AST_PRE_DEC' => %lld,\n", (long long)(ZEND_AST_PRE_DEC)); + fprintf(constants, " 'ZEND_AST_POST_INC' => %lld,\n", (long long)(ZEND_AST_POST_INC)); + fprintf(constants, " 'ZEND_AST_POST_DEC' => %lld,\n", (long long)(ZEND_AST_POST_DEC)); + fprintf(constants, " 'ZEND_AST_YIELD_FROM' => %lld,\n", (long long)(ZEND_AST_YIELD_FROM)); + fprintf(constants, " 'ZEND_AST_CLASS_NAME' => %lld,\n", (long long)(ZEND_AST_CLASS_NAME)); + fprintf(constants, " 'ZEND_AST_GLOBAL' => %lld,\n", (long long)(ZEND_AST_GLOBAL)); + fprintf(constants, " 'ZEND_AST_UNSET' => %lld,\n", (long long)(ZEND_AST_UNSET)); + fprintf(constants, " 'ZEND_AST_RETURN' => %lld,\n", (long long)(ZEND_AST_RETURN)); + fprintf(constants, " 'ZEND_AST_LABEL' => %lld,\n", (long long)(ZEND_AST_LABEL)); + fprintf(constants, " 'ZEND_AST_REF' => %lld,\n", (long long)(ZEND_AST_REF)); + fprintf(constants, " 'ZEND_AST_HALT_COMPILER' => %lld,\n", (long long)(ZEND_AST_HALT_COMPILER)); + fprintf(constants, " 'ZEND_AST_ECHO' => %lld,\n", (long long)(ZEND_AST_ECHO)); + fprintf(constants, " 'ZEND_AST_THROW' => %lld,\n", (long long)(ZEND_AST_THROW)); + fprintf(constants, " 'ZEND_AST_GOTO' => %lld,\n", (long long)(ZEND_AST_GOTO)); + fprintf(constants, " 'ZEND_AST_BREAK' => %lld,\n", (long long)(ZEND_AST_BREAK)); + fprintf(constants, " 'ZEND_AST_CONTINUE' => %lld,\n", (long long)(ZEND_AST_CONTINUE)); + fprintf(constants, " 'ZEND_AST_PROPERTY_HOOK_SHORT_BODY' => %lld,\n", (long long)(ZEND_AST_PROPERTY_HOOK_SHORT_BODY)); + fprintf(constants, " 'ZEND_AST_DIM' => %lld,\n", (long long)(ZEND_AST_DIM)); + fprintf(constants, " 'ZEND_AST_PROP' => %lld,\n", (long long)(ZEND_AST_PROP)); + fprintf(constants, " 'ZEND_AST_NULLSAFE_PROP' => %lld,\n", (long long)(ZEND_AST_NULLSAFE_PROP)); + fprintf(constants, " 'ZEND_AST_STATIC_PROP' => %lld,\n", (long long)(ZEND_AST_STATIC_PROP)); + fprintf(constants, " 'ZEND_AST_CALL' => %lld,\n", (long long)(ZEND_AST_CALL)); + fprintf(constants, " 'ZEND_AST_CLASS_CONST' => %lld,\n", (long long)(ZEND_AST_CLASS_CONST)); + fprintf(constants, " 'ZEND_AST_ASSIGN' => %lld,\n", (long long)(ZEND_AST_ASSIGN)); + fprintf(constants, " 'ZEND_AST_ASSIGN_REF' => %lld,\n", (long long)(ZEND_AST_ASSIGN_REF)); + fprintf(constants, " 'ZEND_AST_ASSIGN_OP' => %lld,\n", (long long)(ZEND_AST_ASSIGN_OP)); + fprintf(constants, " 'ZEND_AST_BINARY_OP' => %lld,\n", (long long)(ZEND_AST_BINARY_OP)); + fprintf(constants, " 'ZEND_AST_GREATER' => %lld,\n", (long long)(ZEND_AST_GREATER)); + fprintf(constants, " 'ZEND_AST_GREATER_EQUAL' => %lld,\n", (long long)(ZEND_AST_GREATER_EQUAL)); + fprintf(constants, " 'ZEND_AST_AND' => %lld,\n", (long long)(ZEND_AST_AND)); + fprintf(constants, " 'ZEND_AST_OR' => %lld,\n", (long long)(ZEND_AST_OR)); + fprintf(constants, " 'ZEND_AST_ARRAY_ELEM' => %lld,\n", (long long)(ZEND_AST_ARRAY_ELEM)); + fprintf(constants, " 'ZEND_AST_NEW' => %lld,\n", (long long)(ZEND_AST_NEW)); + fprintf(constants, " 'ZEND_AST_INSTANCEOF' => %lld,\n", (long long)(ZEND_AST_INSTANCEOF)); + fprintf(constants, " 'ZEND_AST_YIELD' => %lld,\n", (long long)(ZEND_AST_YIELD)); + fprintf(constants, " 'ZEND_AST_COALESCE' => %lld,\n", (long long)(ZEND_AST_COALESCE)); + fprintf(constants, " 'ZEND_AST_ASSIGN_COALESCE' => %lld,\n", (long long)(ZEND_AST_ASSIGN_COALESCE)); + fprintf(constants, " 'ZEND_AST_STATIC' => %lld,\n", (long long)(ZEND_AST_STATIC)); + fprintf(constants, " 'ZEND_AST_WHILE' => %lld,\n", (long long)(ZEND_AST_WHILE)); + fprintf(constants, " 'ZEND_AST_DO_WHILE' => %lld,\n", (long long)(ZEND_AST_DO_WHILE)); + fprintf(constants, " 'ZEND_AST_IF_ELEM' => %lld,\n", (long long)(ZEND_AST_IF_ELEM)); + fprintf(constants, " 'ZEND_AST_SWITCH' => %lld,\n", (long long)(ZEND_AST_SWITCH)); + fprintf(constants, " 'ZEND_AST_SWITCH_CASE' => %lld,\n", (long long)(ZEND_AST_SWITCH_CASE)); + fprintf(constants, " 'ZEND_AST_DECLARE' => %lld,\n", (long long)(ZEND_AST_DECLARE)); + fprintf(constants, " 'ZEND_AST_USE_TRAIT' => %lld,\n", (long long)(ZEND_AST_USE_TRAIT)); + fprintf(constants, " 'ZEND_AST_TRAIT_PRECEDENCE' => %lld,\n", (long long)(ZEND_AST_TRAIT_PRECEDENCE)); + fprintf(constants, " 'ZEND_AST_METHOD_REFERENCE' => %lld,\n", (long long)(ZEND_AST_METHOD_REFERENCE)); + fprintf(constants, " 'ZEND_AST_NAMESPACE' => %lld,\n", (long long)(ZEND_AST_NAMESPACE)); + fprintf(constants, " 'ZEND_AST_USE_ELEM' => %lld,\n", (long long)(ZEND_AST_USE_ELEM)); + fprintf(constants, " 'ZEND_AST_TRAIT_ALIAS' => %lld,\n", (long long)(ZEND_AST_TRAIT_ALIAS)); + fprintf(constants, " 'ZEND_AST_GROUP_USE' => %lld,\n", (long long)(ZEND_AST_GROUP_USE)); + fprintf(constants, " 'ZEND_AST_ATTRIBUTE' => %lld,\n", (long long)(ZEND_AST_ATTRIBUTE)); + fprintf(constants, " 'ZEND_AST_MATCH' => %lld,\n", (long long)(ZEND_AST_MATCH)); + fprintf(constants, " 'ZEND_AST_MATCH_ARM' => %lld,\n", (long long)(ZEND_AST_MATCH_ARM)); + fprintf(constants, " 'ZEND_AST_NAMED_ARG' => %lld,\n", (long long)(ZEND_AST_NAMED_ARG)); + fprintf(constants, " 'ZEND_AST_PARENT_PROPERTY_HOOK_CALL' => %lld,\n", (long long)(ZEND_AST_PARENT_PROPERTY_HOOK_CALL)); + fprintf(constants, " 'ZEND_AST_PIPE' => %lld,\n", (long long)(ZEND_AST_PIPE)); + fprintf(constants, " 'ZEND_AST_METHOD_CALL' => %lld,\n", (long long)(ZEND_AST_METHOD_CALL)); + fprintf(constants, " 'ZEND_AST_NULLSAFE_METHOD_CALL' => %lld,\n", (long long)(ZEND_AST_NULLSAFE_METHOD_CALL)); + fprintf(constants, " 'ZEND_AST_STATIC_CALL' => %lld,\n", (long long)(ZEND_AST_STATIC_CALL)); + fprintf(constants, " 'ZEND_AST_CONDITIONAL' => %lld,\n", (long long)(ZEND_AST_CONDITIONAL)); + fprintf(constants, " 'ZEND_AST_TRY' => %lld,\n", (long long)(ZEND_AST_TRY)); + fprintf(constants, " 'ZEND_AST_CATCH' => %lld,\n", (long long)(ZEND_AST_CATCH)); + fprintf(constants, " 'ZEND_AST_PROP_GROUP' => %lld,\n", (long long)(ZEND_AST_PROP_GROUP)); + fprintf(constants, " 'ZEND_AST_CONST_ELEM' => %lld,\n", (long long)(ZEND_AST_CONST_ELEM)); + fprintf(constants, " 'ZEND_AST_CLASS_CONST_GROUP' => %lld,\n", (long long)(ZEND_AST_CLASS_CONST_GROUP)); + fprintf(constants, " 'ZEND_AST_CONST_ENUM_INIT' => %lld,\n", (long long)(ZEND_AST_CONST_ENUM_INIT)); + fprintf(constants, " 'ZEND_AST_FOR' => %lld,\n", (long long)(ZEND_AST_FOR)); + fprintf(constants, " 'ZEND_AST_FOREACH' => %lld,\n", (long long)(ZEND_AST_FOREACH)); + fprintf(constants, " 'ZEND_AST_ENUM_CASE' => %lld,\n", (long long)(ZEND_AST_ENUM_CASE)); + fprintf(constants, " 'ZEND_AST_PROP_ELEM' => %lld,\n", (long long)(ZEND_AST_PROP_ELEM)); + fprintf(constants, " 'ZEND_AST_PARAM' => %lld,\n", (long long)(ZEND_AST_PARAM)); + fprintf(constants, " 'ZEND_PROPERTY_HOOK_GET' => %lld,\n", (long long)(ZEND_PROPERTY_HOOK_GET)); + fprintf(constants, " 'ZEND_PROPERTY_HOOK_SET' => %lld,\n", (long long)(ZEND_PROPERTY_HOOK_SET)); + fprintf(constants, " 'ZEND_NOP' => 0,\n"); + fprintf(constants, " 'ZEND_ADD' => 1,\n"); + fprintf(constants, " 'ZEND_SUB' => 2,\n"); + fprintf(constants, " 'ZEND_MUL' => 3,\n"); + fprintf(constants, " 'ZEND_DIV' => 4,\n"); + fprintf(constants, " 'ZEND_MOD' => 5,\n"); + fprintf(constants, " 'ZEND_SL' => 6,\n"); + fprintf(constants, " 'ZEND_SR' => 7,\n"); + fprintf(constants, " 'ZEND_CONCAT' => 8,\n"); + fprintf(constants, " 'ZEND_BW_OR' => 9,\n"); + fprintf(constants, " 'ZEND_BW_AND' => 10,\n"); + fprintf(constants, " 'ZEND_BW_XOR' => 11,\n"); + fprintf(constants, " 'ZEND_POW' => 12,\n"); + fprintf(constants, " 'ZEND_BW_NOT' => 13,\n"); + fprintf(constants, " 'ZEND_BOOL_NOT' => 14,\n"); + fprintf(constants, " 'ZEND_BOOL_XOR' => 15,\n"); + fprintf(constants, " 'ZEND_IS_IDENTICAL' => 16,\n"); + fprintf(constants, " 'ZEND_IS_NOT_IDENTICAL' => 17,\n"); + fprintf(constants, " 'ZEND_IS_EQUAL' => 18,\n"); + fprintf(constants, " 'ZEND_IS_NOT_EQUAL' => 19,\n"); + fprintf(constants, " 'ZEND_IS_SMALLER' => 20,\n"); + fprintf(constants, " 'ZEND_IS_SMALLER_OR_EQUAL' => 21,\n"); + fprintf(constants, " 'ZEND_ASSIGN' => 22,\n"); + fprintf(constants, " 'ZEND_ASSIGN_DIM' => 23,\n"); + fprintf(constants, " 'ZEND_ASSIGN_OBJ' => 24,\n"); + fprintf(constants, " 'ZEND_ASSIGN_STATIC_PROP' => 25,\n"); + fprintf(constants, " 'ZEND_ASSIGN_OP' => 26,\n"); + fprintf(constants, " 'ZEND_ASSIGN_DIM_OP' => 27,\n"); + fprintf(constants, " 'ZEND_ASSIGN_OBJ_OP' => 28,\n"); + fprintf(constants, " 'ZEND_ASSIGN_STATIC_PROP_OP' => 29,\n"); + fprintf(constants, " 'ZEND_ASSIGN_REF' => 30,\n"); + fprintf(constants, " 'ZEND_QM_ASSIGN' => 31,\n"); + fprintf(constants, " 'ZEND_ASSIGN_OBJ_REF' => 32,\n"); + fprintf(constants, " 'ZEND_ASSIGN_STATIC_PROP_REF' => 33,\n"); + fprintf(constants, " 'ZEND_PRE_INC' => 34,\n"); + fprintf(constants, " 'ZEND_PRE_DEC' => 35,\n"); + fprintf(constants, " 'ZEND_POST_INC' => 36,\n"); + fprintf(constants, " 'ZEND_POST_DEC' => 37,\n"); + fprintf(constants, " 'ZEND_PRE_INC_STATIC_PROP' => 38,\n"); + fprintf(constants, " 'ZEND_PRE_DEC_STATIC_PROP' => 39,\n"); + fprintf(constants, " 'ZEND_POST_INC_STATIC_PROP' => 40,\n"); + fprintf(constants, " 'ZEND_POST_DEC_STATIC_PROP' => 41,\n"); + fprintf(constants, " 'ZEND_JMP' => 42,\n"); + fprintf(constants, " 'ZEND_JMPZ' => 43,\n"); + fprintf(constants, " 'ZEND_JMPNZ' => 44,\n"); + fprintf(constants, " 'ZEND_JMPZ_EX' => 46,\n"); + fprintf(constants, " 'ZEND_JMPNZ_EX' => 47,\n"); + fprintf(constants, " 'ZEND_CASE' => 48,\n"); + fprintf(constants, " 'ZEND_CHECK_VAR' => 49,\n"); + fprintf(constants, " 'ZEND_SEND_VAR_NO_REF_EX' => 50,\n"); + fprintf(constants, " 'ZEND_CAST' => 51,\n"); + fprintf(constants, " 'ZEND_BOOL' => 52,\n"); + fprintf(constants, " 'ZEND_FAST_CONCAT' => 53,\n"); + fprintf(constants, " 'ZEND_ROPE_INIT' => 54,\n"); + fprintf(constants, " 'ZEND_ROPE_ADD' => 55,\n"); + fprintf(constants, " 'ZEND_ROPE_END' => 56,\n"); + fprintf(constants, " 'ZEND_BEGIN_SILENCE' => 57,\n"); + fprintf(constants, " 'ZEND_END_SILENCE' => 58,\n"); + fprintf(constants, " 'ZEND_INIT_FCALL_BY_NAME' => 59,\n"); + fprintf(constants, " 'ZEND_DO_FCALL' => 60,\n"); + fprintf(constants, " 'ZEND_INIT_FCALL' => 61,\n"); + fprintf(constants, " 'ZEND_RETURN' => 62,\n"); + fprintf(constants, " 'ZEND_RECV' => 63,\n"); + fprintf(constants, " 'ZEND_RECV_INIT' => 64,\n"); + fprintf(constants, " 'ZEND_SEND_VAL' => 65,\n"); + fprintf(constants, " 'ZEND_SEND_VAR_EX' => 66,\n"); + fprintf(constants, " 'ZEND_SEND_REF' => 67,\n"); + fprintf(constants, " 'ZEND_NEW' => 68,\n"); + fprintf(constants, " 'ZEND_INIT_NS_FCALL_BY_NAME' => 69,\n"); + fprintf(constants, " 'ZEND_FREE' => 70,\n"); + fprintf(constants, " 'ZEND_INIT_ARRAY' => 71,\n"); + fprintf(constants, " 'ZEND_ADD_ARRAY_ELEMENT' => 72,\n"); + fprintf(constants, " 'ZEND_INCLUDE_OR_EVAL' => 73,\n"); + fprintf(constants, " 'ZEND_UNSET_VAR' => 74,\n"); + fprintf(constants, " 'ZEND_UNSET_DIM' => 75,\n"); + fprintf(constants, " 'ZEND_UNSET_OBJ' => 76,\n"); + fprintf(constants, " 'ZEND_FE_RESET_R' => 77,\n"); + fprintf(constants, " 'ZEND_FE_FETCH_R' => 78,\n"); + fprintf(constants, " 'ZEND_FETCH_R' => 80,\n"); + fprintf(constants, " 'ZEND_FETCH_DIM_R' => 81,\n"); + fprintf(constants, " 'ZEND_FETCH_OBJ_R' => 82,\n"); + fprintf(constants, " 'ZEND_FETCH_W' => 83,\n"); + fprintf(constants, " 'ZEND_FETCH_DIM_W' => 84,\n"); + fprintf(constants, " 'ZEND_FETCH_OBJ_W' => 85,\n"); + fprintf(constants, " 'ZEND_FETCH_RW' => 86,\n"); + fprintf(constants, " 'ZEND_FETCH_DIM_RW' => 87,\n"); + fprintf(constants, " 'ZEND_FETCH_OBJ_RW' => 88,\n"); + fprintf(constants, " 'ZEND_FETCH_IS' => 89,\n"); + fprintf(constants, " 'ZEND_FETCH_DIM_IS' => 90,\n"); + fprintf(constants, " 'ZEND_FETCH_OBJ_IS' => 91,\n"); + fprintf(constants, " 'ZEND_FETCH_FUNC_ARG' => 92,\n"); + fprintf(constants, " 'ZEND_FETCH_DIM_FUNC_ARG' => 93,\n"); + fprintf(constants, " 'ZEND_FETCH_OBJ_FUNC_ARG' => 94,\n"); + fprintf(constants, " 'ZEND_FETCH_UNSET' => 95,\n"); + fprintf(constants, " 'ZEND_FETCH_DIM_UNSET' => 96,\n"); + fprintf(constants, " 'ZEND_FETCH_OBJ_UNSET' => 97,\n"); + fprintf(constants, " 'ZEND_FETCH_LIST_R' => 98,\n"); + fprintf(constants, " 'ZEND_FETCH_CONSTANT' => 99,\n"); + fprintf(constants, " 'ZEND_CHECK_FUNC_ARG' => 100,\n"); + fprintf(constants, " 'ZEND_EXT_STMT' => 101,\n"); + fprintf(constants, " 'ZEND_EXT_FCALL_BEGIN' => 102,\n"); + fprintf(constants, " 'ZEND_EXT_FCALL_END' => 103,\n"); + fprintf(constants, " 'ZEND_EXT_NOP' => 104,\n"); + fprintf(constants, " 'ZEND_TICKS' => 105,\n"); + fprintf(constants, " 'ZEND_SEND_VAR_NO_REF' => 106,\n"); + fprintf(constants, " 'ZEND_CATCH' => 107,\n"); + fprintf(constants, " 'ZEND_THROW' => 108,\n"); + fprintf(constants, " 'ZEND_FETCH_CLASS' => 109,\n"); + fprintf(constants, " 'ZEND_CLONE' => 110,\n"); + fprintf(constants, " 'ZEND_RETURN_BY_REF' => 111,\n"); + fprintf(constants, " 'ZEND_INIT_METHOD_CALL' => 112,\n"); + fprintf(constants, " 'ZEND_INIT_STATIC_METHOD_CALL' => 113,\n"); + fprintf(constants, " 'ZEND_ISSET_ISEMPTY_VAR' => 114,\n"); + fprintf(constants, " 'ZEND_ISSET_ISEMPTY_DIM_OBJ' => 115,\n"); + fprintf(constants, " 'ZEND_SEND_VAL_EX' => 116,\n"); + fprintf(constants, " 'ZEND_SEND_VAR' => 117,\n"); + fprintf(constants, " 'ZEND_INIT_USER_CALL' => 118,\n"); + fprintf(constants, " 'ZEND_SEND_ARRAY' => 119,\n"); + fprintf(constants, " 'ZEND_SEND_USER' => 120,\n"); + fprintf(constants, " 'ZEND_STRLEN' => 121,\n"); + fprintf(constants, " 'ZEND_DEFINED' => 122,\n"); + fprintf(constants, " 'ZEND_TYPE_CHECK' => 123,\n"); + fprintf(constants, " 'ZEND_VERIFY_RETURN_TYPE' => 124,\n"); + fprintf(constants, " 'ZEND_FE_RESET_RW' => 125,\n"); + fprintf(constants, " 'ZEND_FE_FETCH_RW' => 126,\n"); + fprintf(constants, " 'ZEND_FE_FREE' => 127,\n"); + fprintf(constants, " 'ZEND_INIT_DYNAMIC_CALL' => 128,\n"); + fprintf(constants, " 'ZEND_DO_ICALL' => 129,\n"); + fprintf(constants, " 'ZEND_DO_UCALL' => 130,\n"); + fprintf(constants, " 'ZEND_DO_FCALL_BY_NAME' => 131,\n"); + fprintf(constants, " 'ZEND_PRE_INC_OBJ' => 132,\n"); + fprintf(constants, " 'ZEND_PRE_DEC_OBJ' => 133,\n"); + fprintf(constants, " 'ZEND_POST_INC_OBJ' => 134,\n"); + fprintf(constants, " 'ZEND_POST_DEC_OBJ' => 135,\n"); + fprintf(constants, " 'ZEND_ECHO' => 136,\n"); + fprintf(constants, " 'ZEND_OP_DATA' => 137,\n"); + fprintf(constants, " 'ZEND_INSTANCEOF' => 138,\n"); + fprintf(constants, " 'ZEND_GENERATOR_CREATE' => 139,\n"); + fprintf(constants, " 'ZEND_MAKE_REF' => 140,\n"); + fprintf(constants, " 'ZEND_DECLARE_FUNCTION' => 141,\n"); + fprintf(constants, " 'ZEND_DECLARE_LAMBDA_FUNCTION' => 142,\n"); + fprintf(constants, " 'ZEND_DECLARE_CONST' => 143,\n"); + fprintf(constants, " 'ZEND_DECLARE_CLASS' => 144,\n"); + fprintf(constants, " 'ZEND_DECLARE_CLASS_DELAYED' => 145,\n"); + fprintf(constants, " 'ZEND_DECLARE_ANON_CLASS' => 146,\n"); + fprintf(constants, " 'ZEND_ADD_ARRAY_UNPACK' => 147,\n"); + fprintf(constants, " 'ZEND_ISSET_ISEMPTY_PROP_OBJ' => 148,\n"); + fprintf(constants, " 'ZEND_HANDLE_EXCEPTION' => 149,\n"); + fprintf(constants, " 'ZEND_USER_OPCODE' => 150,\n"); + fprintf(constants, " 'ZEND_ASSERT_CHECK' => 151,\n"); + fprintf(constants, " 'ZEND_JMP_SET' => 152,\n"); + fprintf(constants, " 'ZEND_UNSET_CV' => 153,\n"); + fprintf(constants, " 'ZEND_ISSET_ISEMPTY_CV' => 154,\n"); + fprintf(constants, " 'ZEND_FETCH_LIST_W' => 155,\n"); + fprintf(constants, " 'ZEND_SEPARATE' => 156,\n"); + fprintf(constants, " 'ZEND_FETCH_CLASS_NAME' => 157,\n"); + fprintf(constants, " 'ZEND_CALL_TRAMPOLINE' => 158,\n"); + fprintf(constants, " 'ZEND_DISCARD_EXCEPTION' => 159,\n"); + fprintf(constants, " 'ZEND_YIELD' => 160,\n"); + fprintf(constants, " 'ZEND_GENERATOR_RETURN' => 161,\n"); + fprintf(constants, " 'ZEND_FAST_CALL' => 162,\n"); + fprintf(constants, " 'ZEND_FAST_RET' => 163,\n"); + fprintf(constants, " 'ZEND_RECV_VARIADIC' => 164,\n"); + fprintf(constants, " 'ZEND_SEND_UNPACK' => 165,\n"); + fprintf(constants, " 'ZEND_YIELD_FROM' => 166,\n"); + fprintf(constants, " 'ZEND_COPY_TMP' => 167,\n"); + fprintf(constants, " 'ZEND_BIND_GLOBAL' => 168,\n"); + fprintf(constants, " 'ZEND_COALESCE' => 169,\n"); + fprintf(constants, " 'ZEND_SPACESHIP' => 170,\n"); + fprintf(constants, " 'ZEND_FUNC_NUM_ARGS' => 171,\n"); + fprintf(constants, " 'ZEND_FUNC_GET_ARGS' => 172,\n"); + fprintf(constants, " 'ZEND_FETCH_STATIC_PROP_R' => 173,\n"); + fprintf(constants, " 'ZEND_FETCH_STATIC_PROP_W' => 174,\n"); + fprintf(constants, " 'ZEND_FETCH_STATIC_PROP_RW' => 175,\n"); + fprintf(constants, " 'ZEND_FETCH_STATIC_PROP_IS' => 176,\n"); + fprintf(constants, " 'ZEND_FETCH_STATIC_PROP_FUNC_ARG' => 177,\n"); + fprintf(constants, " 'ZEND_FETCH_STATIC_PROP_UNSET' => 178,\n"); + fprintf(constants, " 'ZEND_UNSET_STATIC_PROP' => 179,\n"); + fprintf(constants, " 'ZEND_ISSET_ISEMPTY_STATIC_PROP' => 180,\n"); + fprintf(constants, " 'ZEND_FETCH_CLASS_CONSTANT' => 181,\n"); + fprintf(constants, " 'ZEND_BIND_LEXICAL' => 182,\n"); + fprintf(constants, " 'ZEND_BIND_STATIC' => 183,\n"); + fprintf(constants, " 'ZEND_FETCH_THIS' => 184,\n"); + fprintf(constants, " 'ZEND_SEND_FUNC_ARG' => 185,\n"); + fprintf(constants, " 'ZEND_ISSET_ISEMPTY_THIS' => 186,\n"); + fprintf(constants, " 'ZEND_SWITCH_LONG' => 187,\n"); + fprintf(constants, " 'ZEND_SWITCH_STRING' => 188,\n"); + fprintf(constants, " 'ZEND_IN_ARRAY' => 189,\n"); + fprintf(constants, " 'ZEND_COUNT' => 190,\n"); + fprintf(constants, " 'ZEND_GET_CLASS' => 191,\n"); + fprintf(constants, " 'ZEND_GET_CALLED_CLASS' => 192,\n"); + fprintf(constants, " 'ZEND_GET_TYPE' => 193,\n"); + fprintf(constants, " 'ZEND_ARRAY_KEY_EXISTS' => 194,\n"); + fprintf(constants, " 'ZEND_MATCH' => 195,\n"); + fprintf(constants, " 'ZEND_CASE_STRICT' => 196,\n"); + fprintf(constants, " 'ZEND_MATCH_ERROR' => 197,\n"); + fprintf(constants, " 'ZEND_JMP_NULL' => 198,\n"); + fprintf(constants, " 'ZEND_CHECK_UNDEF_ARGS' => 199,\n"); + fprintf(constants, " 'ZEND_FETCH_GLOBALS' => 200,\n"); + fprintf(constants, " 'ZEND_VERIFY_NEVER_TYPE' => 201,\n"); + fprintf(constants, " 'ZEND_CALLABLE_CONVERT' => 202,\n"); + fprintf(constants, " 'ZEND_BIND_INIT_STATIC_OR_JMP' => 203,\n"); + fprintf(constants, " 'ZEND_FRAMELESS_ICALL_0' => 204,\n"); + fprintf(constants, " 'ZEND_FRAMELESS_ICALL_1' => 205,\n"); + fprintf(constants, " 'ZEND_FRAMELESS_ICALL_2' => 206,\n"); + fprintf(constants, " 'ZEND_FRAMELESS_ICALL_3' => 207,\n"); + fprintf(constants, " 'ZEND_JMP_FRAMELESS' => 208,\n"); + fprintf(constants, " 'ZEND_INIT_PARENT_PROPERTY_HOOK_CALL' => 209,\n"); + fprintf(constants, " 'ZEND_DECLARE_ATTRIBUTED_CONST' => 210,\n"); + fprintf(constants, " 'ZEND_VM_LAST_OPCODE' => 210,\n"); + fputs("];\n", constants); + fclose(constants); + + fputs("{\n", layouts); + fprintf(layouts, " \"meta\": {\"php\": \"%d.%d\", \"api\": %d, \"zts\": %d, \"debug\": %d},\n", PHP_MAJOR_VERSION, PHP_MINOR_VERSION, ZEND_MODULE_API_NO, (int)USING_ZTS, (int)ZEND_DEBUG); + fputs(" \"structs\": {\n", layouts); + fputs(" \"zval\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zval)); + fprintf(layouts, "\"value\": %zu", offsetof(zval, value)); + fprintf(layouts, ", \"u1\": %zu", offsetof(zval, u1)); + fprintf(layouts, ", \"u2\": %zu", offsetof(zval, u2)); + fputs("}},\n", layouts); + fputs(" \"zend_refcounted\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_refcounted)); + fprintf(layouts, "\"gc\": %zu", offsetof(zend_refcounted, gc)); + fputs("}},\n", layouts); + fputs(" \"zend_string\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_string)); + fprintf(layouts, "\"gc\": %zu", offsetof(zend_string, gc)); + fprintf(layouts, ", \"h\": %zu", offsetof(zend_string, h)); + fprintf(layouts, ", \"len\": %zu", offsetof(zend_string, len)); + fprintf(layouts, ", \"val\": %zu", offsetof(zend_string, val)); + fputs("}},\n", layouts); + fputs(" \"zend_array\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_array)); + fprintf(layouts, "\"gc\": %zu", offsetof(zend_array, gc)); + fprintf(layouts, ", \"u\": %zu", offsetof(zend_array, u)); + fprintf(layouts, ", \"nTableMask\": %zu", offsetof(zend_array, nTableMask)); + fprintf(layouts, ", \"arHash\": %zu", offsetof(zend_array, arHash)); + fprintf(layouts, ", \"arData\": %zu", offsetof(zend_array, arData)); + fprintf(layouts, ", \"arPacked\": %zu", offsetof(zend_array, arPacked)); + fprintf(layouts, ", \"nNumUsed\": %zu", offsetof(zend_array, nNumUsed)); + fprintf(layouts, ", \"nNumOfElements\": %zu", offsetof(zend_array, nNumOfElements)); + fprintf(layouts, ", \"nTableSize\": %zu", offsetof(zend_array, nTableSize)); + fprintf(layouts, ", \"nInternalPointer\": %zu", offsetof(zend_array, nInternalPointer)); + fprintf(layouts, ", \"nNextFreeElement\": %zu", offsetof(zend_array, nNextFreeElement)); + fprintf(layouts, ", \"pDestructor\": %zu", offsetof(zend_array, pDestructor)); + fputs("}},\n", layouts); + fputs(" \"Bucket\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(Bucket)); + fprintf(layouts, "\"val\": %zu", offsetof(Bucket, val)); + fprintf(layouts, ", \"h\": %zu", offsetof(Bucket, h)); + fprintf(layouts, ", \"key\": %zu", offsetof(Bucket, key)); + fputs("}},\n", layouts); + fputs(" \"zend_object\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_object)); + fprintf(layouts, "\"gc\": %zu", offsetof(zend_object, gc)); + fprintf(layouts, ", \"handle\": %zu", offsetof(zend_object, handle)); + fprintf(layouts, ", \"extra_flags\": %zu", offsetof(zend_object, extra_flags)); + fprintf(layouts, ", \"ce\": %zu", offsetof(zend_object, ce)); + fprintf(layouts, ", \"handlers\": %zu", offsetof(zend_object, handlers)); + fprintf(layouts, ", \"properties\": %zu", offsetof(zend_object, properties)); + fprintf(layouts, ", \"properties_table\": %zu", offsetof(zend_object, properties_table)); + fputs("}},\n", layouts); + fputs(" \"zend_resource\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_resource)); + fprintf(layouts, "\"gc\": %zu", offsetof(zend_resource, gc)); + fprintf(layouts, ", \"handle\": %zu", offsetof(zend_resource, handle)); + fprintf(layouts, ", \"type\": %zu", offsetof(zend_resource, type)); + fprintf(layouts, ", \"ptr\": %zu", offsetof(zend_resource, ptr)); + fputs("}},\n", layouts); + fputs(" \"zend_reference\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_reference)); + fprintf(layouts, "\"gc\": %zu", offsetof(zend_reference, gc)); + fprintf(layouts, ", \"val\": %zu", offsetof(zend_reference, val)); + fprintf(layouts, ", \"sources\": %zu", offsetof(zend_reference, sources)); + fputs("}},\n", layouts); + fputs(" \"zend_class_entry\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_class_entry)); + fprintf(layouts, "\"type\": %zu", offsetof(zend_class_entry, type)); + fprintf(layouts, ", \"name\": %zu", offsetof(zend_class_entry, name)); + fprintf(layouts, ", \"parent\": %zu", offsetof(zend_class_entry, parent)); + fprintf(layouts, ", \"parent_name\": %zu", offsetof(zend_class_entry, parent_name)); + fprintf(layouts, ", \"refcount\": %zu", offsetof(zend_class_entry, refcount)); + fprintf(layouts, ", \"ce_flags\": %zu", offsetof(zend_class_entry, ce_flags)); + fprintf(layouts, ", \"default_properties_count\": %zu", offsetof(zend_class_entry, default_properties_count)); + fprintf(layouts, ", \"default_static_members_count\": %zu", offsetof(zend_class_entry, default_static_members_count)); + fprintf(layouts, ", \"default_properties_table\": %zu", offsetof(zend_class_entry, default_properties_table)); + fprintf(layouts, ", \"default_static_members_table\": %zu", offsetof(zend_class_entry, default_static_members_table)); + fprintf(layouts, ", \"static_members_table__ptr\": %zu", offsetof(zend_class_entry, static_members_table__ptr)); + fprintf(layouts, ", \"function_table\": %zu", offsetof(zend_class_entry, function_table)); + fprintf(layouts, ", \"properties_info\": %zu", offsetof(zend_class_entry, properties_info)); + fprintf(layouts, ", \"constants_table\": %zu", offsetof(zend_class_entry, constants_table)); + fprintf(layouts, ", \"mutable_data__ptr\": %zu", offsetof(zend_class_entry, mutable_data__ptr)); + fprintf(layouts, ", \"inheritance_cache\": %zu", offsetof(zend_class_entry, inheritance_cache)); + fprintf(layouts, ", \"properties_info_table\": %zu", offsetof(zend_class_entry, properties_info_table)); + fprintf(layouts, ", \"constructor\": %zu", offsetof(zend_class_entry, constructor)); + fprintf(layouts, ", \"destructor\": %zu", offsetof(zend_class_entry, destructor)); + fprintf(layouts, ", \"clone\": %zu", offsetof(zend_class_entry, clone)); + fprintf(layouts, ", \"__get\": %zu", offsetof(zend_class_entry, __get)); + fprintf(layouts, ", \"__set\": %zu", offsetof(zend_class_entry, __set)); + fprintf(layouts, ", \"__unset\": %zu", offsetof(zend_class_entry, __unset)); + fprintf(layouts, ", \"__isset\": %zu", offsetof(zend_class_entry, __isset)); + fprintf(layouts, ", \"__call\": %zu", offsetof(zend_class_entry, __call)); + fprintf(layouts, ", \"__callstatic\": %zu", offsetof(zend_class_entry, __callstatic)); + fprintf(layouts, ", \"__tostring\": %zu", offsetof(zend_class_entry, __tostring)); + fprintf(layouts, ", \"__debugInfo\": %zu", offsetof(zend_class_entry, __debugInfo)); + fprintf(layouts, ", \"__serialize\": %zu", offsetof(zend_class_entry, __serialize)); + fprintf(layouts, ", \"__unserialize\": %zu", offsetof(zend_class_entry, __unserialize)); + fprintf(layouts, ", \"default_object_handlers\": %zu", offsetof(zend_class_entry, default_object_handlers)); + fprintf(layouts, ", \"iterator_funcs_ptr\": %zu", offsetof(zend_class_entry, iterator_funcs_ptr)); + fprintf(layouts, ", \"arrayaccess_funcs_ptr\": %zu", offsetof(zend_class_entry, arrayaccess_funcs_ptr)); + fprintf(layouts, ", \"create_object\": %zu", offsetof(zend_class_entry, create_object)); + fprintf(layouts, ", \"interface_gets_implemented\": %zu", offsetof(zend_class_entry, interface_gets_implemented)); + fprintf(layouts, ", \"get_iterator\": %zu", offsetof(zend_class_entry, get_iterator)); + fprintf(layouts, ", \"get_static_method\": %zu", offsetof(zend_class_entry, get_static_method)); + fprintf(layouts, ", \"serialize\": %zu", offsetof(zend_class_entry, serialize)); + fprintf(layouts, ", \"unserialize\": %zu", offsetof(zend_class_entry, unserialize)); + fprintf(layouts, ", \"num_interfaces\": %zu", offsetof(zend_class_entry, num_interfaces)); + fprintf(layouts, ", \"num_traits\": %zu", offsetof(zend_class_entry, num_traits)); + fprintf(layouts, ", \"num_hooked_props\": %zu", offsetof(zend_class_entry, num_hooked_props)); + fprintf(layouts, ", \"num_hooked_prop_variance_checks\": %zu", offsetof(zend_class_entry, num_hooked_prop_variance_checks)); + fprintf(layouts, ", \"interfaces\": %zu", offsetof(zend_class_entry, interfaces)); + fprintf(layouts, ", \"interface_names\": %zu", offsetof(zend_class_entry, interface_names)); + fprintf(layouts, ", \"trait_names\": %zu", offsetof(zend_class_entry, trait_names)); + fprintf(layouts, ", \"trait_aliases\": %zu", offsetof(zend_class_entry, trait_aliases)); + fprintf(layouts, ", \"trait_precedences\": %zu", offsetof(zend_class_entry, trait_precedences)); + fprintf(layouts, ", \"attributes\": %zu", offsetof(zend_class_entry, attributes)); + fprintf(layouts, ", \"enum_backing_type\": %zu", offsetof(zend_class_entry, enum_backing_type)); + fprintf(layouts, ", \"backed_enum_table\": %zu", offsetof(zend_class_entry, backed_enum_table)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_class_entry, doc_comment)); + fprintf(layouts, ", \"info\": %zu", offsetof(zend_class_entry, info)); + fputs("}},\n", layouts); + fputs(" \"zend_class_constant\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_class_constant)); + fprintf(layouts, "\"value\": %zu", offsetof(zend_class_constant, value)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_class_constant, doc_comment)); + fprintf(layouts, ", \"attributes\": %zu", offsetof(zend_class_constant, attributes)); + fprintf(layouts, ", \"ce\": %zu", offsetof(zend_class_constant, ce)); + fprintf(layouts, ", \"type\": %zu", offsetof(zend_class_constant, type)); + fputs("}},\n", layouts); + fputs(" \"zend_class_name\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_class_name)); + fprintf(layouts, "\"name\": %zu", offsetof(zend_class_name, name)); + fprintf(layouts, ", \"lc_name\": %zu", offsetof(zend_class_name, lc_name)); + fputs("}},\n", layouts); + fputs(" \"zend_property_info\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_property_info)); + fprintf(layouts, "\"offset\": %zu", offsetof(zend_property_info, offset)); + fprintf(layouts, ", \"flags\": %zu", offsetof(zend_property_info, flags)); + fprintf(layouts, ", \"name\": %zu", offsetof(zend_property_info, name)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_property_info, doc_comment)); + fprintf(layouts, ", \"attributes\": %zu", offsetof(zend_property_info, attributes)); + fprintf(layouts, ", \"ce\": %zu", offsetof(zend_property_info, ce)); + fprintf(layouts, ", \"type\": %zu", offsetof(zend_property_info, type)); + fprintf(layouts, ", \"prototype\": %zu", offsetof(zend_property_info, prototype)); + fprintf(layouts, ", \"hooks\": %zu", offsetof(zend_property_info, hooks)); + fputs("}},\n", layouts); + fputs(" \"zend_type_list\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_type_list)); + fprintf(layouts, "\"num_types\": %zu", offsetof(zend_type_list, num_types)); + fprintf(layouts, ", \"types\": %zu", offsetof(zend_type_list, types)); + fputs("}},\n", layouts); + fputs(" \"zend_constant\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_constant)); + fprintf(layouts, "\"value\": %zu", offsetof(zend_constant, value)); + fprintf(layouts, ", \"name\": %zu", offsetof(zend_constant, name)); + fprintf(layouts, ", \"filename\": %zu", offsetof(zend_constant, filename)); + fprintf(layouts, ", \"attributes\": %zu", offsetof(zend_constant, attributes)); + fputs("}},\n", layouts); + fputs(" \"zend_attribute\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_attribute)); + fprintf(layouts, "\"name\": %zu", offsetof(zend_attribute, name)); + fprintf(layouts, ", \"lcname\": %zu", offsetof(zend_attribute, lcname)); + fprintf(layouts, ", \"validation_error\": %zu", offsetof(zend_attribute, validation_error)); + fprintf(layouts, ", \"flags\": %zu", offsetof(zend_attribute, flags)); + fprintf(layouts, ", \"lineno\": %zu", offsetof(zend_attribute, lineno)); + fprintf(layouts, ", \"offset\": %zu", offsetof(zend_attribute, offset)); + fprintf(layouts, ", \"argc\": %zu", offsetof(zend_attribute, argc)); + fprintf(layouts, ", \"args\": %zu", offsetof(zend_attribute, args)); + fputs("}},\n", layouts); + fputs(" \"zend_attribute_arg\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_attribute_arg)); + fprintf(layouts, "\"name\": %zu", offsetof(zend_attribute_arg, name)); + fprintf(layouts, ", \"value\": %zu", offsetof(zend_attribute_arg, value)); + fputs("}},\n", layouts); + fputs(" \"zend_op_array\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_op_array)); + fprintf(layouts, "\"type\": %zu", offsetof(zend_op_array, type)); + fprintf(layouts, ", \"arg_flags\": %zu", offsetof(zend_op_array, arg_flags)); + fprintf(layouts, ", \"fn_flags\": %zu", offsetof(zend_op_array, fn_flags)); + fprintf(layouts, ", \"function_name\": %zu", offsetof(zend_op_array, function_name)); + fprintf(layouts, ", \"scope\": %zu", offsetof(zend_op_array, scope)); + fprintf(layouts, ", \"prototype\": %zu", offsetof(zend_op_array, prototype)); + fprintf(layouts, ", \"num_args\": %zu", offsetof(zend_op_array, num_args)); + fprintf(layouts, ", \"required_num_args\": %zu", offsetof(zend_op_array, required_num_args)); + fprintf(layouts, ", \"arg_info\": %zu", offsetof(zend_op_array, arg_info)); + fprintf(layouts, ", \"attributes\": %zu", offsetof(zend_op_array, attributes)); + fprintf(layouts, ", \"run_time_cache__ptr\": %zu", offsetof(zend_op_array, run_time_cache__ptr)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_op_array, doc_comment)); + fprintf(layouts, ", \"T\": %zu", offsetof(zend_op_array, T)); + fprintf(layouts, ", \"prop_info\": %zu", offsetof(zend_op_array, prop_info)); + fprintf(layouts, ", \"cache_size\": %zu", offsetof(zend_op_array, cache_size)); + fprintf(layouts, ", \"last_var\": %zu", offsetof(zend_op_array, last_var)); + fprintf(layouts, ", \"last\": %zu", offsetof(zend_op_array, last)); + fprintf(layouts, ", \"opcodes\": %zu", offsetof(zend_op_array, opcodes)); + fprintf(layouts, ", \"static_variables_ptr__ptr\": %zu", offsetof(zend_op_array, static_variables_ptr__ptr)); + fprintf(layouts, ", \"static_variables\": %zu", offsetof(zend_op_array, static_variables)); + fprintf(layouts, ", \"vars\": %zu", offsetof(zend_op_array, vars)); + fprintf(layouts, ", \"refcount\": %zu", offsetof(zend_op_array, refcount)); + fprintf(layouts, ", \"last_live_range\": %zu", offsetof(zend_op_array, last_live_range)); + fprintf(layouts, ", \"last_try_catch\": %zu", offsetof(zend_op_array, last_try_catch)); + fprintf(layouts, ", \"live_range\": %zu", offsetof(zend_op_array, live_range)); + fprintf(layouts, ", \"try_catch_array\": %zu", offsetof(zend_op_array, try_catch_array)); + fprintf(layouts, ", \"filename\": %zu", offsetof(zend_op_array, filename)); + fprintf(layouts, ", \"line_start\": %zu", offsetof(zend_op_array, line_start)); + fprintf(layouts, ", \"line_end\": %zu", offsetof(zend_op_array, line_end)); + fprintf(layouts, ", \"last_literal\": %zu", offsetof(zend_op_array, last_literal)); + fprintf(layouts, ", \"num_dynamic_func_defs\": %zu", offsetof(zend_op_array, num_dynamic_func_defs)); + fprintf(layouts, ", \"literals\": %zu", offsetof(zend_op_array, literals)); + fprintf(layouts, ", \"dynamic_func_defs\": %zu", offsetof(zend_op_array, dynamic_func_defs)); + fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_op_array, reserved)); + fputs("}},\n", layouts); + fputs(" \"zend_internal_function\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_internal_function)); + fprintf(layouts, "\"type\": %zu", offsetof(zend_internal_function, type)); + fprintf(layouts, ", \"arg_flags\": %zu", offsetof(zend_internal_function, arg_flags)); + fprintf(layouts, ", \"fn_flags\": %zu", offsetof(zend_internal_function, fn_flags)); + fprintf(layouts, ", \"function_name\": %zu", offsetof(zend_internal_function, function_name)); + fprintf(layouts, ", \"scope\": %zu", offsetof(zend_internal_function, scope)); + fprintf(layouts, ", \"prototype\": %zu", offsetof(zend_internal_function, prototype)); + fprintf(layouts, ", \"num_args\": %zu", offsetof(zend_internal_function, num_args)); + fprintf(layouts, ", \"required_num_args\": %zu", offsetof(zend_internal_function, required_num_args)); + fprintf(layouts, ", \"arg_info\": %zu", offsetof(zend_internal_function, arg_info)); + fprintf(layouts, ", \"attributes\": %zu", offsetof(zend_internal_function, attributes)); + fprintf(layouts, ", \"run_time_cache__ptr\": %zu", offsetof(zend_internal_function, run_time_cache__ptr)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_internal_function, doc_comment)); + fprintf(layouts, ", \"T\": %zu", offsetof(zend_internal_function, T)); + fprintf(layouts, ", \"prop_info\": %zu", offsetof(zend_internal_function, prop_info)); + fprintf(layouts, ", \"handler\": %zu", offsetof(zend_internal_function, handler)); + fprintf(layouts, ", \"module\": %zu", offsetof(zend_internal_function, module)); + fprintf(layouts, ", \"frameless_function_infos\": %zu", offsetof(zend_internal_function, frameless_function_infos)); + fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_internal_function, reserved)); + fputs("}},\n", layouts); + fputs(" \"zend_op\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_op)); + fprintf(layouts, "\"handler\": %zu", offsetof(zend_op, handler)); + fprintf(layouts, ", \"op1\": %zu", offsetof(zend_op, op1)); + fprintf(layouts, ", \"op2\": %zu", offsetof(zend_op, op2)); + fprintf(layouts, ", \"result\": %zu", offsetof(zend_op, result)); + fprintf(layouts, ", \"extended_value\": %zu", offsetof(zend_op, extended_value)); + fprintf(layouts, ", \"lineno\": %zu", offsetof(zend_op, lineno)); + fprintf(layouts, ", \"opcode\": %zu", offsetof(zend_op, opcode)); + fprintf(layouts, ", \"op1_type\": %zu", offsetof(zend_op, op1_type)); + fprintf(layouts, ", \"op2_type\": %zu", offsetof(zend_op, op2_type)); + fprintf(layouts, ", \"result_type\": %zu", offsetof(zend_op, result_type)); + fputs("}},\n", layouts); + fputs(" \"zend_execute_data\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_execute_data)); + fprintf(layouts, "\"opline\": %zu", offsetof(zend_execute_data, opline)); + fprintf(layouts, ", \"call\": %zu", offsetof(zend_execute_data, call)); + fprintf(layouts, ", \"return_value\": %zu", offsetof(zend_execute_data, return_value)); + fprintf(layouts, ", \"func\": %zu", offsetof(zend_execute_data, func)); + fprintf(layouts, ", \"This\": %zu", offsetof(zend_execute_data, This)); + fprintf(layouts, ", \"prev_execute_data\": %zu", offsetof(zend_execute_data, prev_execute_data)); + fprintf(layouts, ", \"symbol_table\": %zu", offsetof(zend_execute_data, symbol_table)); + fprintf(layouts, ", \"run_time_cache\": %zu", offsetof(zend_execute_data, run_time_cache)); + fprintf(layouts, ", \"extra_named_params\": %zu", offsetof(zend_execute_data, extra_named_params)); + fputs("}},\n", layouts); + fputs(" \"zend_objects_store\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_objects_store)); + fprintf(layouts, "\"object_buckets\": %zu", offsetof(zend_objects_store, object_buckets)); + fprintf(layouts, ", \"top\": %zu", offsetof(zend_objects_store, top)); + fprintf(layouts, ", \"size\": %zu", offsetof(zend_objects_store, size)); + fprintf(layouts, ", \"free_list_head\": %zu", offsetof(zend_objects_store, free_list_head)); + fputs("}},\n", layouts); + fputs(" \"zend_executor_globals\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_executor_globals)); + fprintf(layouts, "\"uninitialized_zval\": %zu", offsetof(zend_executor_globals, uninitialized_zval)); + fprintf(layouts, ", \"error_zval\": %zu", offsetof(zend_executor_globals, error_zval)); + fprintf(layouts, ", \"symtable_cache\": %zu", offsetof(zend_executor_globals, symtable_cache)); + fprintf(layouts, ", \"symtable_cache_limit\": %zu", offsetof(zend_executor_globals, symtable_cache_limit)); + fprintf(layouts, ", \"symtable_cache_ptr\": %zu", offsetof(zend_executor_globals, symtable_cache_ptr)); + fprintf(layouts, ", \"symbol_table\": %zu", offsetof(zend_executor_globals, symbol_table)); + fprintf(layouts, ", \"included_files\": %zu", offsetof(zend_executor_globals, included_files)); + fprintf(layouts, ", \"bailout\": %zu", offsetof(zend_executor_globals, bailout)); + fprintf(layouts, ", \"error_reporting\": %zu", offsetof(zend_executor_globals, error_reporting)); + fprintf(layouts, ", \"fatal_error_backtrace_on\": %zu", offsetof(zend_executor_globals, fatal_error_backtrace_on)); + fprintf(layouts, ", \"last_fatal_error_backtrace\": %zu", offsetof(zend_executor_globals, last_fatal_error_backtrace)); + fprintf(layouts, ", \"exit_status\": %zu", offsetof(zend_executor_globals, exit_status)); + fprintf(layouts, ", \"function_table\": %zu", offsetof(zend_executor_globals, function_table)); + fprintf(layouts, ", \"class_table\": %zu", offsetof(zend_executor_globals, class_table)); + fprintf(layouts, ", \"zend_constants\": %zu", offsetof(zend_executor_globals, zend_constants)); + fprintf(layouts, ", \"vm_stack_top\": %zu", offsetof(zend_executor_globals, vm_stack_top)); + fprintf(layouts, ", \"vm_stack_end\": %zu", offsetof(zend_executor_globals, vm_stack_end)); + fprintf(layouts, ", \"vm_stack\": %zu", offsetof(zend_executor_globals, vm_stack)); + fprintf(layouts, ", \"vm_stack_page_size\": %zu", offsetof(zend_executor_globals, vm_stack_page_size)); + fprintf(layouts, ", \"current_execute_data\": %zu", offsetof(zend_executor_globals, current_execute_data)); + fprintf(layouts, ", \"fake_scope\": %zu", offsetof(zend_executor_globals, fake_scope)); + fprintf(layouts, ", \"jit_trace_num\": %zu", offsetof(zend_executor_globals, jit_trace_num)); + fprintf(layouts, ", \"current_observed_frame\": %zu", offsetof(zend_executor_globals, current_observed_frame)); + fprintf(layouts, ", \"ticks_count\": %zu", offsetof(zend_executor_globals, ticks_count)); + fprintf(layouts, ", \"precision\": %zu", offsetof(zend_executor_globals, precision)); + fprintf(layouts, ", \"persistent_constants_count\": %zu", offsetof(zend_executor_globals, persistent_constants_count)); + fprintf(layouts, ", \"persistent_functions_count\": %zu", offsetof(zend_executor_globals, persistent_functions_count)); + fprintf(layouts, ", \"persistent_classes_count\": %zu", offsetof(zend_executor_globals, persistent_classes_count)); + fprintf(layouts, ", \"no_extensions\": %zu", offsetof(zend_executor_globals, no_extensions)); + fprintf(layouts, ", \"full_tables_cleanup\": %zu", offsetof(zend_executor_globals, full_tables_cleanup)); + fprintf(layouts, ", \"vm_interrupt\": %zu", offsetof(zend_executor_globals, vm_interrupt)); + fprintf(layouts, ", \"timed_out\": %zu", offsetof(zend_executor_globals, timed_out)); + fprintf(layouts, ", \"in_autoload\": %zu", offsetof(zend_executor_globals, in_autoload)); + fprintf(layouts, ", \"hard_timeout\": %zu", offsetof(zend_executor_globals, hard_timeout)); + fprintf(layouts, ", \"stack_base\": %zu", offsetof(zend_executor_globals, stack_base)); + fprintf(layouts, ", \"stack_limit\": %zu", offsetof(zend_executor_globals, stack_limit)); + fprintf(layouts, ", \"regular_list\": %zu", offsetof(zend_executor_globals, regular_list)); + fprintf(layouts, ", \"persistent_list\": %zu", offsetof(zend_executor_globals, persistent_list)); + fprintf(layouts, ", \"user_error_handler_error_reporting\": %zu", offsetof(zend_executor_globals, user_error_handler_error_reporting)); + fprintf(layouts, ", \"exception_ignore_args\": %zu", offsetof(zend_executor_globals, exception_ignore_args)); + fprintf(layouts, ", \"user_error_handler\": %zu", offsetof(zend_executor_globals, user_error_handler)); + fprintf(layouts, ", \"user_exception_handler\": %zu", offsetof(zend_executor_globals, user_exception_handler)); + fprintf(layouts, ", \"user_error_handlers_error_reporting\": %zu", offsetof(zend_executor_globals, user_error_handlers_error_reporting)); + fprintf(layouts, ", \"user_error_handlers\": %zu", offsetof(zend_executor_globals, user_error_handlers)); + fprintf(layouts, ", \"user_exception_handlers\": %zu", offsetof(zend_executor_globals, user_exception_handlers)); + fprintf(layouts, ", \"exception_class\": %zu", offsetof(zend_executor_globals, exception_class)); + fprintf(layouts, ", \"error_handling\": %zu", offsetof(zend_executor_globals, error_handling)); + fprintf(layouts, ", \"capture_warnings_during_sccp\": %zu", offsetof(zend_executor_globals, capture_warnings_during_sccp)); + fprintf(layouts, ", \"timeout_seconds\": %zu", offsetof(zend_executor_globals, timeout_seconds)); + fprintf(layouts, ", \"ini_directives\": %zu", offsetof(zend_executor_globals, ini_directives)); + fprintf(layouts, ", \"modified_ini_directives\": %zu", offsetof(zend_executor_globals, modified_ini_directives)); + fprintf(layouts, ", \"error_reporting_ini_entry\": %zu", offsetof(zend_executor_globals, error_reporting_ini_entry)); + fprintf(layouts, ", \"objects_store\": %zu", offsetof(zend_executor_globals, objects_store)); + fprintf(layouts, ", \"lazy_objects_store\": %zu", offsetof(zend_executor_globals, lazy_objects_store)); + fprintf(layouts, ", \"exception\": %zu", offsetof(zend_executor_globals, exception)); + fprintf(layouts, ", \"prev_exception\": %zu", offsetof(zend_executor_globals, prev_exception)); + fprintf(layouts, ", \"opline_before_exception\": %zu", offsetof(zend_executor_globals, opline_before_exception)); + fprintf(layouts, ", \"exception_op\": %zu", offsetof(zend_executor_globals, exception_op)); + fprintf(layouts, ", \"current_module\": %zu", offsetof(zend_executor_globals, current_module)); + fprintf(layouts, ", \"active\": %zu", offsetof(zend_executor_globals, active)); + fprintf(layouts, ", \"flags\": %zu", offsetof(zend_executor_globals, flags)); + fprintf(layouts, ", \"assertions\": %zu", offsetof(zend_executor_globals, assertions)); + fprintf(layouts, ", \"ht_iterators_count\": %zu", offsetof(zend_executor_globals, ht_iterators_count)); + fprintf(layouts, ", \"ht_iterators_used\": %zu", offsetof(zend_executor_globals, ht_iterators_used)); + fprintf(layouts, ", \"ht_iterators\": %zu", offsetof(zend_executor_globals, ht_iterators)); + fprintf(layouts, ", \"ht_iterators_slots\": %zu", offsetof(zend_executor_globals, ht_iterators_slots)); + fprintf(layouts, ", \"saved_fpu_cw_ptr\": %zu", offsetof(zend_executor_globals, saved_fpu_cw_ptr)); + fprintf(layouts, ", \"trampoline\": %zu", offsetof(zend_executor_globals, trampoline)); + fprintf(layouts, ", \"call_trampoline_op\": %zu", offsetof(zend_executor_globals, call_trampoline_op)); + fprintf(layouts, ", \"weakrefs\": %zu", offsetof(zend_executor_globals, weakrefs)); + fprintf(layouts, ", \"exception_string_param_max_len\": %zu", offsetof(zend_executor_globals, exception_string_param_max_len)); + fprintf(layouts, ", \"get_gc_buffer\": %zu", offsetof(zend_executor_globals, get_gc_buffer)); + fprintf(layouts, ", \"main_fiber_context\": %zu", offsetof(zend_executor_globals, main_fiber_context)); + fprintf(layouts, ", \"current_fiber_context\": %zu", offsetof(zend_executor_globals, current_fiber_context)); + fprintf(layouts, ", \"active_fiber\": %zu", offsetof(zend_executor_globals, active_fiber)); + fprintf(layouts, ", \"fiber_stack_size\": %zu", offsetof(zend_executor_globals, fiber_stack_size)); + fprintf(layouts, ", \"record_errors\": %zu", offsetof(zend_executor_globals, record_errors)); + fprintf(layouts, ", \"num_errors\": %zu", offsetof(zend_executor_globals, num_errors)); + fprintf(layouts, ", \"errors\": %zu", offsetof(zend_executor_globals, errors)); + fprintf(layouts, ", \"filename_override\": %zu", offsetof(zend_executor_globals, filename_override)); + fprintf(layouts, ", \"lineno_override\": %zu", offsetof(zend_executor_globals, lineno_override)); + fprintf(layouts, ", \"call_stack\": %zu", offsetof(zend_executor_globals, call_stack)); + fprintf(layouts, ", \"max_allowed_stack_size\": %zu", offsetof(zend_executor_globals, max_allowed_stack_size)); + fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); + fprintf(layouts, ", \"max_execution_timer_timer\": %zu", offsetof(zend_executor_globals, max_execution_timer_timer)); + fprintf(layouts, ", \"pid\": %zu", offsetof(zend_executor_globals, pid)); + fprintf(layouts, ", \"oldact\": %zu", offsetof(zend_executor_globals, oldact)); + fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); + fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fputs("}},\n", layouts); + fputs(" \"zend_compiler_globals\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); + fprintf(layouts, "\"loop_var_stack\": %zu", offsetof(zend_compiler_globals, loop_var_stack)); + fprintf(layouts, ", \"active_class_entry\": %zu", offsetof(zend_compiler_globals, active_class_entry)); + fprintf(layouts, ", \"compiled_filename\": %zu", offsetof(zend_compiler_globals, compiled_filename)); + fprintf(layouts, ", \"zend_lineno\": %zu", offsetof(zend_compiler_globals, zend_lineno)); + fprintf(layouts, ", \"active_op_array\": %zu", offsetof(zend_compiler_globals, active_op_array)); + fprintf(layouts, ", \"function_table\": %zu", offsetof(zend_compiler_globals, function_table)); + fprintf(layouts, ", \"class_table\": %zu", offsetof(zend_compiler_globals, class_table)); + fprintf(layouts, ", \"auto_globals\": %zu", offsetof(zend_compiler_globals, auto_globals)); + fprintf(layouts, ", \"parse_error\": %zu", offsetof(zend_compiler_globals, parse_error)); + fprintf(layouts, ", \"in_compilation\": %zu", offsetof(zend_compiler_globals, in_compilation)); + fprintf(layouts, ", \"short_tags\": %zu", offsetof(zend_compiler_globals, short_tags)); + fprintf(layouts, ", \"unclean_shutdown\": %zu", offsetof(zend_compiler_globals, unclean_shutdown)); + fprintf(layouts, ", \"ini_parser_unbuffered_errors\": %zu", offsetof(zend_compiler_globals, ini_parser_unbuffered_errors)); + fprintf(layouts, ", \"open_files\": %zu", offsetof(zend_compiler_globals, open_files)); + fprintf(layouts, ", \"ini_parser_param\": %zu", offsetof(zend_compiler_globals, ini_parser_param)); + fprintf(layouts, ", \"skip_shebang\": %zu", offsetof(zend_compiler_globals, skip_shebang)); + fprintf(layouts, ", \"increment_lineno\": %zu", offsetof(zend_compiler_globals, increment_lineno)); + fprintf(layouts, ", \"variable_width_locale\": %zu", offsetof(zend_compiler_globals, variable_width_locale)); + fprintf(layouts, ", \"ascii_compatible_locale\": %zu", offsetof(zend_compiler_globals, ascii_compatible_locale)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_compiler_globals, doc_comment)); + fprintf(layouts, ", \"extra_fn_flags\": %zu", offsetof(zend_compiler_globals, extra_fn_flags)); + fprintf(layouts, ", \"compiler_options\": %zu", offsetof(zend_compiler_globals, compiler_options)); + fprintf(layouts, ", \"context\": %zu", offsetof(zend_compiler_globals, context)); + fprintf(layouts, ", \"file_context\": %zu", offsetof(zend_compiler_globals, file_context)); + fprintf(layouts, ", \"arena\": %zu", offsetof(zend_compiler_globals, arena)); + fprintf(layouts, ", \"interned_strings\": %zu", offsetof(zend_compiler_globals, interned_strings)); + fprintf(layouts, ", \"script_encoding_list\": %zu", offsetof(zend_compiler_globals, script_encoding_list)); + fprintf(layouts, ", \"script_encoding_list_size\": %zu", offsetof(zend_compiler_globals, script_encoding_list_size)); + fprintf(layouts, ", \"multibyte\": %zu", offsetof(zend_compiler_globals, multibyte)); + fprintf(layouts, ", \"detect_unicode\": %zu", offsetof(zend_compiler_globals, detect_unicode)); + fprintf(layouts, ", \"encoding_declared\": %zu", offsetof(zend_compiler_globals, encoding_declared)); + fprintf(layouts, ", \"ast\": %zu", offsetof(zend_compiler_globals, ast)); + fprintf(layouts, ", \"ast_arena\": %zu", offsetof(zend_compiler_globals, ast_arena)); + fprintf(layouts, ", \"delayed_oplines_stack\": %zu", offsetof(zend_compiler_globals, delayed_oplines_stack)); + fprintf(layouts, ", \"memoized_exprs\": %zu", offsetof(zend_compiler_globals, memoized_exprs)); + fprintf(layouts, ", \"memoize_mode\": %zu", offsetof(zend_compiler_globals, memoize_mode)); + fprintf(layouts, ", \"map_ptr_real_base\": %zu", offsetof(zend_compiler_globals, map_ptr_real_base)); + fprintf(layouts, ", \"map_ptr_base\": %zu", offsetof(zend_compiler_globals, map_ptr_base)); + fprintf(layouts, ", \"map_ptr_size\": %zu", offsetof(zend_compiler_globals, map_ptr_size)); + fprintf(layouts, ", \"map_ptr_last\": %zu", offsetof(zend_compiler_globals, map_ptr_last)); + fprintf(layouts, ", \"delayed_variance_obligations\": %zu", offsetof(zend_compiler_globals, delayed_variance_obligations)); + fprintf(layouts, ", \"delayed_autoloads\": %zu", offsetof(zend_compiler_globals, delayed_autoloads)); + fprintf(layouts, ", \"unlinked_uses\": %zu", offsetof(zend_compiler_globals, unlinked_uses)); + fprintf(layouts, ", \"current_linking_class\": %zu", offsetof(zend_compiler_globals, current_linking_class)); + fprintf(layouts, ", \"rtd_key_counter\": %zu", offsetof(zend_compiler_globals, rtd_key_counter)); + fprintf(layouts, ", \"internal_run_time_cache\": %zu", offsetof(zend_compiler_globals, internal_run_time_cache)); + fprintf(layouts, ", \"internal_run_time_cache_size\": %zu", offsetof(zend_compiler_globals, internal_run_time_cache_size)); + fprintf(layouts, ", \"short_circuiting_opnums\": %zu", offsetof(zend_compiler_globals, short_circuiting_opnums)); + fprintf(layouts, ", \"copied_functions_count\": %zu", offsetof(zend_compiler_globals, copied_functions_count)); + fputs("}},\n", layouts); + fputs(" \"zend_module_entry\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_module_entry)); + fprintf(layouts, "\"size\": %zu", offsetof(zend_module_entry, size)); + fprintf(layouts, ", \"zend_api\": %zu", offsetof(zend_module_entry, zend_api)); + fprintf(layouts, ", \"zend_debug\": %zu", offsetof(zend_module_entry, zend_debug)); + fprintf(layouts, ", \"zts\": %zu", offsetof(zend_module_entry, zts)); + fprintf(layouts, ", \"ini_entry\": %zu", offsetof(zend_module_entry, ini_entry)); + fprintf(layouts, ", \"deps\": %zu", offsetof(zend_module_entry, deps)); + fprintf(layouts, ", \"name\": %zu", offsetof(zend_module_entry, name)); + fprintf(layouts, ", \"functions\": %zu", offsetof(zend_module_entry, functions)); + fprintf(layouts, ", \"module_startup_func\": %zu", offsetof(zend_module_entry, module_startup_func)); + fprintf(layouts, ", \"module_shutdown_func\": %zu", offsetof(zend_module_entry, module_shutdown_func)); + fprintf(layouts, ", \"request_startup_func\": %zu", offsetof(zend_module_entry, request_startup_func)); + fprintf(layouts, ", \"request_shutdown_func\": %zu", offsetof(zend_module_entry, request_shutdown_func)); + fprintf(layouts, ", \"info_func\": %zu", offsetof(zend_module_entry, info_func)); + fprintf(layouts, ", \"version\": %zu", offsetof(zend_module_entry, version)); + fprintf(layouts, ", \"globals_size\": %zu", offsetof(zend_module_entry, globals_size)); + fprintf(layouts, ", \"globals_id_ptr\": %zu", offsetof(zend_module_entry, globals_id_ptr)); + fprintf(layouts, ", \"globals_ctor\": %zu", offsetof(zend_module_entry, globals_ctor)); + fprintf(layouts, ", \"globals_dtor\": %zu", offsetof(zend_module_entry, globals_dtor)); + fprintf(layouts, ", \"post_deactivate_func\": %zu", offsetof(zend_module_entry, post_deactivate_func)); + fprintf(layouts, ", \"module_started\": %zu", offsetof(zend_module_entry, module_started)); + fprintf(layouts, ", \"type\": %zu", offsetof(zend_module_entry, type)); + fprintf(layouts, ", \"handle\": %zu", offsetof(zend_module_entry, handle)); + fprintf(layouts, ", \"module_number\": %zu", offsetof(zend_module_entry, module_number)); + fprintf(layouts, ", \"build_id\": %zu", offsetof(zend_module_entry, build_id)); + fputs("}},\n", layouts); + fputs(" \"zend_module_dep\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_module_dep)); + fprintf(layouts, "\"name\": %zu", offsetof(zend_module_dep, name)); + fprintf(layouts, ", \"rel\": %zu", offsetof(zend_module_dep, rel)); + fprintf(layouts, ", \"version\": %zu", offsetof(zend_module_dep, version)); + fprintf(layouts, ", \"type\": %zu", offsetof(zend_module_dep, type)); + fputs("}},\n", layouts); + fputs(" \"zend_object_handlers\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_object_handlers)); + fprintf(layouts, "\"offset\": %zu", offsetof(zend_object_handlers, offset)); + fprintf(layouts, ", \"free_obj\": %zu", offsetof(zend_object_handlers, free_obj)); + fprintf(layouts, ", \"dtor_obj\": %zu", offsetof(zend_object_handlers, dtor_obj)); + fprintf(layouts, ", \"clone_obj\": %zu", offsetof(zend_object_handlers, clone_obj)); + fprintf(layouts, ", \"clone_obj_with\": %zu", offsetof(zend_object_handlers, clone_obj_with)); + fprintf(layouts, ", \"read_property\": %zu", offsetof(zend_object_handlers, read_property)); + fprintf(layouts, ", \"write_property\": %zu", offsetof(zend_object_handlers, write_property)); + fprintf(layouts, ", \"read_dimension\": %zu", offsetof(zend_object_handlers, read_dimension)); + fprintf(layouts, ", \"write_dimension\": %zu", offsetof(zend_object_handlers, write_dimension)); + fprintf(layouts, ", \"get_property_ptr_ptr\": %zu", offsetof(zend_object_handlers, get_property_ptr_ptr)); + fprintf(layouts, ", \"has_property\": %zu", offsetof(zend_object_handlers, has_property)); + fprintf(layouts, ", \"unset_property\": %zu", offsetof(zend_object_handlers, unset_property)); + fprintf(layouts, ", \"has_dimension\": %zu", offsetof(zend_object_handlers, has_dimension)); + fprintf(layouts, ", \"unset_dimension\": %zu", offsetof(zend_object_handlers, unset_dimension)); + fprintf(layouts, ", \"get_properties\": %zu", offsetof(zend_object_handlers, get_properties)); + fprintf(layouts, ", \"get_method\": %zu", offsetof(zend_object_handlers, get_method)); + fprintf(layouts, ", \"get_constructor\": %zu", offsetof(zend_object_handlers, get_constructor)); + fprintf(layouts, ", \"get_class_name\": %zu", offsetof(zend_object_handlers, get_class_name)); + fprintf(layouts, ", \"cast_object\": %zu", offsetof(zend_object_handlers, cast_object)); + fprintf(layouts, ", \"count_elements\": %zu", offsetof(zend_object_handlers, count_elements)); + fprintf(layouts, ", \"get_debug_info\": %zu", offsetof(zend_object_handlers, get_debug_info)); + fprintf(layouts, ", \"get_closure\": %zu", offsetof(zend_object_handlers, get_closure)); + fprintf(layouts, ", \"get_gc\": %zu", offsetof(zend_object_handlers, get_gc)); + fprintf(layouts, ", \"do_operation\": %zu", offsetof(zend_object_handlers, do_operation)); + fprintf(layouts, ", \"compare\": %zu", offsetof(zend_object_handlers, compare)); + fprintf(layouts, ", \"get_properties_for\": %zu", offsetof(zend_object_handlers, get_properties_for)); + fputs("}},\n", layouts); + fputs(" \"zend_object_iterator\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_object_iterator)); + fprintf(layouts, "\"std\": %zu", offsetof(zend_object_iterator, std)); + fprintf(layouts, ", \"data\": %zu", offsetof(zend_object_iterator, data)); + fprintf(layouts, ", \"funcs\": %zu", offsetof(zend_object_iterator, funcs)); + fprintf(layouts, ", \"index\": %zu", offsetof(zend_object_iterator, index)); + fputs("}},\n", layouts); + fputs(" \"zend_object_iterator_funcs\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_object_iterator_funcs)); + fprintf(layouts, "\"dtor\": %zu", offsetof(zend_object_iterator_funcs, dtor)); + fprintf(layouts, ", \"valid\": %zu", offsetof(zend_object_iterator_funcs, valid)); + fprintf(layouts, ", \"get_current_data\": %zu", offsetof(zend_object_iterator_funcs, get_current_data)); + fprintf(layouts, ", \"get_current_key\": %zu", offsetof(zend_object_iterator_funcs, get_current_key)); + fprintf(layouts, ", \"move_forward\": %zu", offsetof(zend_object_iterator_funcs, move_forward)); + fprintf(layouts, ", \"rewind\": %zu", offsetof(zend_object_iterator_funcs, rewind)); + fprintf(layouts, ", \"invalidate_current\": %zu", offsetof(zend_object_iterator_funcs, invalidate_current)); + fprintf(layouts, ", \"get_gc\": %zu", offsetof(zend_object_iterator_funcs, get_gc)); + fputs("}},\n", layouts); + fputs(" \"zend_ast\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_ast)); + fprintf(layouts, "\"kind\": %zu", offsetof(zend_ast, kind)); + fprintf(layouts, ", \"attr\": %zu", offsetof(zend_ast, attr)); + fprintf(layouts, ", \"lineno\": %zu", offsetof(zend_ast, lineno)); + fprintf(layouts, ", \"child\": %zu", offsetof(zend_ast, child)); + fputs("}},\n", layouts); + fputs(" \"zend_ast_decl\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_ast_decl)); + fprintf(layouts, "\"kind\": %zu", offsetof(zend_ast_decl, kind)); + fprintf(layouts, ", \"attr\": %zu", offsetof(zend_ast_decl, attr)); + fprintf(layouts, ", \"start_lineno\": %zu", offsetof(zend_ast_decl, start_lineno)); + fprintf(layouts, ", \"end_lineno\": %zu", offsetof(zend_ast_decl, end_lineno)); + fprintf(layouts, ", \"flags\": %zu", offsetof(zend_ast_decl, flags)); + fprintf(layouts, ", \"doc_comment\": %zu", offsetof(zend_ast_decl, doc_comment)); + fprintf(layouts, ", \"name\": %zu", offsetof(zend_ast_decl, name)); + fprintf(layouts, ", \"child\": %zu", offsetof(zend_ast_decl, child)); + fputs("}},\n", layouts); + fputs(" \"zend_ast_list\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_ast_list)); + fprintf(layouts, "\"kind\": %zu", offsetof(zend_ast_list, kind)); + fprintf(layouts, ", \"attr\": %zu", offsetof(zend_ast_list, attr)); + fprintf(layouts, ", \"lineno\": %zu", offsetof(zend_ast_list, lineno)); + fprintf(layouts, ", \"children\": %zu", offsetof(zend_ast_list, children)); + fprintf(layouts, ", \"child\": %zu", offsetof(zend_ast_list, child)); + fputs("}},\n", layouts); + fputs(" \"zend_ast_zval\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_ast_zval)); + fprintf(layouts, "\"kind\": %zu", offsetof(zend_ast_zval, kind)); + fprintf(layouts, ", \"attr\": %zu", offsetof(zend_ast_zval, attr)); + fprintf(layouts, ", \"val\": %zu", offsetof(zend_ast_zval, val)); + fputs("}},\n", layouts); + fputs(" \"zend_ast_op_array\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_ast_op_array)); + fprintf(layouts, "\"kind\": %zu", offsetof(zend_ast_op_array, kind)); + fprintf(layouts, ", \"attr\": %zu", offsetof(zend_ast_op_array, attr)); + fprintf(layouts, ", \"lineno\": %zu", offsetof(zend_ast_op_array, lineno)); + fprintf(layouts, ", \"op_array\": %zu", offsetof(zend_ast_op_array, op_array)); + fputs("}},\n", layouts); + fputs(" \"zend_lex_state\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_lex_state)); + fprintf(layouts, "\"yy_leng\": %zu", offsetof(zend_lex_state, yy_leng)); + fprintf(layouts, ", \"yy_start\": %zu", offsetof(zend_lex_state, yy_start)); + fprintf(layouts, ", \"yy_text\": %zu", offsetof(zend_lex_state, yy_text)); + fprintf(layouts, ", \"yy_cursor\": %zu", offsetof(zend_lex_state, yy_cursor)); + fprintf(layouts, ", \"yy_marker\": %zu", offsetof(zend_lex_state, yy_marker)); + fprintf(layouts, ", \"yy_limit\": %zu", offsetof(zend_lex_state, yy_limit)); + fprintf(layouts, ", \"yy_state\": %zu", offsetof(zend_lex_state, yy_state)); + fprintf(layouts, ", \"state_stack\": %zu", offsetof(zend_lex_state, state_stack)); + fprintf(layouts, ", \"heredoc_label_stack\": %zu", offsetof(zend_lex_state, heredoc_label_stack)); + fprintf(layouts, ", \"nest_location_stack\": %zu", offsetof(zend_lex_state, nest_location_stack)); + fprintf(layouts, ", \"in\": %zu", offsetof(zend_lex_state, in)); + fprintf(layouts, ", \"lineno\": %zu", offsetof(zend_lex_state, lineno)); + fprintf(layouts, ", \"filename\": %zu", offsetof(zend_lex_state, filename)); + fprintf(layouts, ", \"script_org\": %zu", offsetof(zend_lex_state, script_org)); + fprintf(layouts, ", \"script_org_size\": %zu", offsetof(zend_lex_state, script_org_size)); + fprintf(layouts, ", \"script_filtered\": %zu", offsetof(zend_lex_state, script_filtered)); + fprintf(layouts, ", \"script_filtered_size\": %zu", offsetof(zend_lex_state, script_filtered_size)); + fprintf(layouts, ", \"input_filter\": %zu", offsetof(zend_lex_state, input_filter)); + fprintf(layouts, ", \"output_filter\": %zu", offsetof(zend_lex_state, output_filter)); + fprintf(layouts, ", \"script_encoding\": %zu", offsetof(zend_lex_state, script_encoding)); + fprintf(layouts, ", \"on_event\": %zu", offsetof(zend_lex_state, on_event)); + fprintf(layouts, ", \"on_event_context\": %zu", offsetof(zend_lex_state, on_event_context)); + fprintf(layouts, ", \"ast\": %zu", offsetof(zend_lex_state, ast)); + fprintf(layouts, ", \"ast_arena\": %zu", offsetof(zend_lex_state, ast_arena)); + fputs("}},\n", layouts); + fputs(" \"zend_closure\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_closure)); + fprintf(layouts, "\"std\": %zu", offsetof(zend_closure, std)); + fprintf(layouts, ", \"func\": %zu", offsetof(zend_closure, func)); + fprintf(layouts, ", \"this_ptr\": %zu", offsetof(zend_closure, this_ptr)); + fprintf(layouts, ", \"called_scope\": %zu", offsetof(zend_closure, called_scope)); + fprintf(layouts, ", \"orig_internal_handler\": %zu", offsetof(zend_closure, orig_internal_handler)); + fputs("}},\n", layouts); + fputs(" \"zend_script\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_script)); + fprintf(layouts, "\"filename\": %zu", offsetof(zend_script, filename)); + fprintf(layouts, ", \"main_op_array\": %zu", offsetof(zend_script, main_op_array)); + fprintf(layouts, ", \"function_table\": %zu", offsetof(zend_script, function_table)); + fprintf(layouts, ", \"class_table\": %zu", offsetof(zend_script, class_table)); + fputs("}},\n", layouts); + fputs(" \"zend_error_info\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_error_info)); + fprintf(layouts, "\"type\": %zu", offsetof(zend_error_info, type)); + fprintf(layouts, ", \"lineno\": %zu", offsetof(zend_error_info, lineno)); + fprintf(layouts, ", \"filename\": %zu", offsetof(zend_error_info, filename)); + fprintf(layouts, ", \"message\": %zu", offsetof(zend_error_info, message)); + fputs("}},\n", layouts); + fputs(" \"zend_early_binding\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_early_binding)); + fprintf(layouts, "\"lcname\": %zu", offsetof(zend_early_binding, lcname)); + fprintf(layouts, ", \"rtd_key\": %zu", offsetof(zend_early_binding, rtd_key)); + fprintf(layouts, ", \"lc_parent_name\": %zu", offsetof(zend_early_binding, lc_parent_name)); + fprintf(layouts, ", \"cache_slot\": %zu", offsetof(zend_early_binding, cache_slot)); + fputs("}},\n", layouts); + fputs(" \"zend_persistent_script\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_persistent_script)); + fprintf(layouts, "\"script\": %zu", offsetof(zend_persistent_script, script)); + fprintf(layouts, ", \"compiler_halt_offset\": %zu", offsetof(zend_persistent_script, compiler_halt_offset)); + fprintf(layouts, ", \"ping_auto_globals_mask\": %zu", offsetof(zend_persistent_script, ping_auto_globals_mask)); + fprintf(layouts, ", \"timestamp\": %zu", offsetof(zend_persistent_script, timestamp)); + fprintf(layouts, ", \"corrupted\": %zu", offsetof(zend_persistent_script, corrupted)); + fprintf(layouts, ", \"is_phar\": %zu", offsetof(zend_persistent_script, is_phar)); + fprintf(layouts, ", \"empty\": %zu", offsetof(zend_persistent_script, empty)); + fprintf(layouts, ", \"num_warnings\": %zu", offsetof(zend_persistent_script, num_warnings)); + fprintf(layouts, ", \"num_early_bindings\": %zu", offsetof(zend_persistent_script, num_early_bindings)); + fprintf(layouts, ", \"warnings\": %zu", offsetof(zend_persistent_script, warnings)); + fprintf(layouts, ", \"early_bindings\": %zu", offsetof(zend_persistent_script, early_bindings)); + fprintf(layouts, ", \"mem\": %zu", offsetof(zend_persistent_script, mem)); + fprintf(layouts, ", \"size\": %zu", offsetof(zend_persistent_script, size)); + fprintf(layouts, ", \"dynamic_members\": %zu", offsetof(zend_persistent_script, dynamic_members)); + fputs("}},\n", layouts); + fputs(" \"zend_file_cache_metainfo\": {", layouts); + fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_file_cache_metainfo)); + fprintf(layouts, "\"magic\": %zu", offsetof(zend_file_cache_metainfo, magic)); + fprintf(layouts, ", \"system_id\": %zu", offsetof(zend_file_cache_metainfo, system_id)); + fprintf(layouts, ", \"mem_size\": %zu", offsetof(zend_file_cache_metainfo, mem_size)); + fprintf(layouts, ", \"str_size\": %zu", offsetof(zend_file_cache_metainfo, str_size)); + fprintf(layouts, ", \"script_offset\": %zu", offsetof(zend_file_cache_metainfo, script_offset)); + fprintf(layouts, ", \"timestamp\": %zu", offsetof(zend_file_cache_metainfo, timestamp)); + fprintf(layouts, ", \"checksum\": %zu", offsetof(zend_file_cache_metainfo, checksum)); + fputs("}}\n", layouts); + fputs(" }\n}\n", layouts); + fclose(layouts); + return 0; +}