From 810ff4d150962a9a85fcf6a358763965d1b0e34a Mon Sep 17 00:00:00 2001 From: Alexander Lisachenko Date: Sat, 10 Oct 2026 20:18:13 +0000 Subject: [PATCH 01/14] feat(core): explain the preload-mode configuration and survive ffi.preload next to opcache.preload Under PHP's default ffi.enable=preload a web SAPI may call the FFI API only from code that opcache.preload compiled at server start, so a bridge that was not preloaded cannot bind the engine at all - not even through FFI::scope() over definitions that ffi.preload published. Core::init() answered that with "Preload mode requires that you call Core::preload before", which names a method the operator has no place to call from. The exception is now the php.ini recipe with the paths resolved for the very build that failed: opcache.preload pointed at the bundled preload.php (any script that requires the autoloader does), opcache.preload_user for an FPM master running as root, what ffi.preload does and does not do, the Windows case where opcache.preload does not exist, and a diagnosis of the settings already in place. Core::preloadConfigurationHint() returns the same text on demand; Core::engineHeaderPath() resolves the ffi.preload value for the running build and Core::preloadScriptPath() the opcache.preload one. Configuring ffi.preload together with opcache.preload crashed the server start with a segmentation fault: the preload stage loaded the header into a scope that module startup had already published. Core::preload() now takes an existing scope as is and loads the header only when there is none. Tests run php-cgi (SAPI cgi-fcgi, restricted like php-fpm) next to the CLI binary: the exception carries the recipe, the recipe boots a request, both preloading mechanisms can be combined (the crash reproduces without the guard), and ffi.preload serves a request under ffi.enable=1. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01VLQcsvgdQUzwBFsoKUAcG2 --- README.md | 36 ++++++ docs/long-running.md | 7 +- src/Core.php | 132 +++++++++++++++++++-- tests/CoreInitializationTest.php | 34 ++++++ tests/PreloadModeTest.php | 197 +++++++++++++++++++++++++++++++ 5 files changed, 397 insertions(+), 9 deletions(-) create mode 100644 tests/PreloadModeTest.php diff --git a/README.md b/README.md index cad47198..a0fc509f 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,42 @@ definitions for the life of the server rather than for the preload request alone `opcache.preload` at a script that only requires the autoloader is enough to get the per-request cost down. +### Web SAPIs and `ffi.enable=preload` + +PHP's default `ffi.enable=preload` allows the FFI API on the CLI, but at request time in FPM, +Apache or the built-in server only from code that `opcache.preload` compiled at server start. +So a web SAPI needs z-engine to be *part of the preload stage* — nothing else can bind the +engine there, not even a header published through `ffi.preload`, because the restriction is on +the code that calls FFI, not on the definitions. The whole configuration is (php.ini or an FPM +`php_admin_value`, never `.user.ini` or `ini_set()`; restart the server afterwards): + +```ini +opcache.enable=1 +opcache.preload=/path/to/vendor/lisachenko/z-engine/preload.php +opcache.preload_user=www-data ; FPM only, when the master process runs as root +``` + +Any preload script that requires your Composer autoloader does the same job as the bundled one. +When the bridge cannot bind under preload mode, `Core::init()` throws a `RuntimeException` +whose message is this recipe with the paths resolved for the failing build, plus a diagnosis +of the settings already in place; `Core::preloadConfigurationHint()` returns the same text on +demand. Two more directives are worth knowing: + +- **`ffi.preload`** publishes the C definitions once at module startup, so no request parses + the header. Its value is the generated header for the exact build — minor, OS, architecture + and thread-safety mode — which `Core::engineHeaderPath()` resolves; run it under the PHP the + server uses, since a CLI binary can be a different build than php-fpm: + + ```bash + php -r 'require "vendor/autoload.php"; echo ZEngine\Core::engineHeaderPath();' + ``` + + It is optional next to `opcache.preload` (z-engine takes a scope that is already published + instead of loading the header again), and it is the way to bind once under `ffi.enable=1`. +- **`ffi.enable=1`** allows FFI for every caller; z-engine then binds the definitions per + request, or once at startup with `ffi.preload`. On Windows, where `opcache.preload` does not + exist, this is the only way to run a web SAPI. + `Core::init()` remains public, idempotent and re-invocable, for the cases that want it: booting explicitly at a chosen point, re-booting after `Core::shutdown()` inside a live worker, and turning "the engine is not available here" into its explanation. On a host that cannot run the diff --git a/docs/long-running.md b/docs/long-running.md index 70d69c7d..bfc151f7 100644 --- a/docs/long-running.md +++ b/docs/long-running.md @@ -85,7 +85,12 @@ handlers touch them. - **Worker loops** (RoadRunner, Swoole, ReactPHP, FrankenPHP worker mode): the whole worker is one PHP request. Install hooks once at boot; `Core::shutdown()` runs at worker exit. -- **Classic FPM + opcache preload**: call `Core::preload()` in the preload script, then +- **Classic FPM + opcache preload**: point `opcache.preload` at a script that requires the + Composer autoloader (the bundled `preload.php` does just that; `Core::preload()` in an + existing script stays harmless). Under PHP's default `ffi.enable=preload` this is the only + way a web SAPI can bind the engine: FFI calls at request time are allowed from preloaded code + only, so neither `ffi.preload` nor `ffi.enable=1` replaces the stage - `Core::init()` throws + the resolved php.ini recipe (`Core::preloadConfigurationHint()`) when it is missing. Then `Core::init()` and hook installation happen per request; `Core::shutdown()` guarantees the per-request trampolines are gone from persistent structures before the request ends. - **SAPIs that cycle FFI callback state between handled requests**: call diff --git a/src/Core.php b/src/Core.php index f315398d..2060b9f6 100644 --- a/src/Core.php +++ b/src/Core.php @@ -311,8 +311,8 @@ public static function init(): void try { $engine = FFI::scope('ZEngine'); } catch (FFI\Exception $e) { - if (ini_get('ffi.enable') === 'preload' && PHP_SAPI !== 'cli') { - throw new RuntimeException('Preload mode requires that you call Core::preload before'); + if (self::isFfiRestrictedToPreloadedCode()) { + throw new RuntimeException(self::preloadConfigurationHint()); } // If not, then load definitions by hand $definition = file_get_contents(self::resolveArtifact('engine.h')); @@ -469,14 +469,130 @@ public static function preload(): void } self::assertSupportedEnvironment(); - // The generated header is fully preprocessed and carries FFI_SCOPE, so - // it can be loaded as-is - FFI::load(self::resolveArtifact('engine.h')); + try { + // ffi.preload may already have published the definitions at module startup. The + // scope is then taken as is: FFI::load() of the same header on top of it, inside + // the opcache.preload stage, crashes the process with a segmentation fault (the + // persistent scope gets re-registered), so both preloading mechanisms may be + // configured together only because this probe comes first. + FFI::scope('ZEngine'); + } catch (FFI\Exception) { + // The generated header is fully preprocessed and carries FFI_SCOPE, so + // it can be loaded as-is + FFI::load(self::resolveArtifact('engine.h')); + } // Performs initialization of properties, otherwise we will get an error about uninitialized properties Core::init(); } + /** + * Whether this process may use the FFI API only from code that opcache.preload loaded + * + * That is what `ffi.enable=preload` (PHP's default) means outside the CLI: at request + * time every FFI call must come from a function or class the preload stage compiled, so + * a bridge that was not preloaded cannot bind the engine definitions at all - not even + * FFI::scope() over definitions that ffi.preload published. The CLI is exempt. + */ + private static function isFfiRestrictedToPreloadedCode(): bool + { + return strtolower((string) ini_get('ffi.enable')) === 'preload' && PHP_SAPI !== 'cli'; + } + + /** + * Absolute path of the generated engine header for the running PHP build - the value + * for `ffi.preload`, which publishes the definitions once at module startup + * + * Resolve it with the very PHP build the server runs (`php -r` on the CLI binary may be + * a different thread-safety mode or minor than php-fpm): the header is specific to the + * minor, the OS, the architecture and the thread-safety mode. + */ + public static function engineHeaderPath(): string + { + $path = self::resolveArtifact('engine.h', false); + $real = realpath($path); + + return $real === false ? $path : $real; + } + + /** + * Absolute path of the bundled `opcache.preload` script + * + * It only requires the Composer autoloader, which is all the preload stage needs: the + * bootstrap recognises the stage and publishes the definitions for the server's life. + * Any existing preload script that requires the autoloader serves the same purpose. + */ + public static function preloadScriptPath(): string + { + $path = realpath(dirname(__DIR__) . '/preload.php'); + + return $path === false ? dirname(__DIR__) . '/preload.php' : $path; + } + + /** + * The php.ini recipe for running z-engine under `ffi.enable=preload`, with the paths + * resolved for this very build and a diagnosis of the settings already in place + * + * This is the message Core::init() throws when the bridge cannot bind under preload + * mode. It is public so a deployment can print it from the SAPI it configures: + * + * php -r 'require "vendor/autoload.php"; echo ZEngine\Core::preloadConfigurationHint();' + */ + public static function preloadConfigurationHint(): string + { + $preloadScript = (string) ini_get('opcache.preload'); + $ffiPreload = (string) ini_get('ffi.preload'); + $bundledScript = self::preloadScriptPath(); + $engineHeader = self::engineHeaderPath(); + $isWindows = PHP_OS_FAMILY === 'Windows'; + $lines = []; + $lines[] = 'z-engine cannot bind the engine definitions in this process: ffi.enable=preload (PHP\'s ' + . 'default) restricts the FFI API outside the CLI to code that opcache.preload loaded at server ' + . 'start, and z-engine was not part of that stage.'; + $lines[] = ''; + if ($isWindows) { + $lines[] = 'opcache.preload does not exist on Windows, so preload mode cannot serve a web SAPI there. ' + . 'Allow FFI for every caller instead and let z-engine bind the definitions per request, or ' + . 'once at startup with ffi.preload (php.ini, then restart the server):'; + $lines[] = ''; + $lines[] = ' ffi.enable=1'; + $lines[] = ' ffi.preload=' . $engineHeader; + } else { + $lines[] = 'Point opcache.preload at a script that requires your Composer autoloader - the bundled one ' + . 'does exactly that - in php.ini (system level: php.ini or an FPM php_admin_value, never ' + . '.user.ini or ini_set()), then restart the server:'; + $lines[] = ''; + $lines[] = ' opcache.enable=1'; + $lines[] = ' opcache.preload=' . $bundledScript; + $lines[] = ' opcache.preload_user=www-data ; FPM only, when the master process runs as root'; + if ($preloadScript !== '') { + $lines[] = ''; + $lines[] = sprintf( + 'opcache.preload is already set to "%s", but that stage did not initialize z-engine: make sure ' + . 'the script requires vendor/autoload.php, that opcache is enabled for this SAPI, and check the ' + . 'error log for a failed preload stage (an FPM master running as root needs opcache.preload_user).', + $preloadScript, + ); + } + $lines[] = ''; + $lines[] = 'Optional: ffi.preload=' . $engineHeader . ' additionally publishes the C definitions at ' + . 'module startup. It is not a substitute for opcache.preload under ffi.enable=preload - the ' + . 'restriction is on the code that calls FFI, not on the definitions - but it is harmless next to it.'; + if ($ffiPreload !== '') { + $lines[] = sprintf( + 'ffi.preload is currently "%s"%s.', + $ffiPreload, + $ffiPreload === $engineHeader ? '' : ' - this build needs ' . $engineHeader, + ); + } + $lines[] = ''; + $lines[] = 'Alternatively ffi.enable=1 allows FFI for every caller; z-engine then binds the definitions ' + . 'per request, or once at startup with the same ffi.preload line.'; + } + + return implode("\n", $lines); + } + /** * Checks if Core::init() (or preload(), which calls it) has completed for this * process/thread - i.e. the engine bridge is ready to use. @@ -508,15 +624,15 @@ private static function assertSupportedEnvironment(): void throw new RuntimeException( 'z-engine requires the ffi extension, which is not loaded. Install it and enable it ' . 'with ffi.enable=1 (or ffi.enable=preload together with an opcache.preload script ' - . 'that calls Core::preload()).', + . 'that requires the Composer autoloader - see Core::preloadConfigurationHint()).', ); } $ffiEnable = strtolower((string) ini_get('ffi.enable')); if (in_array($ffiEnable, ['', '0', 'off', 'false', 'no'], true)) { throw new RuntimeException(sprintf( 'z-engine requires FFI to be usable, but ini setting ffi.enable is "%s". Set ' - . 'ffi.enable=1, or use ffi.enable=preload with an opcache.preload script that calls ' - . 'Core::preload().', + . 'ffi.enable=1, or use ffi.enable=preload with an opcache.preload script that requires ' + . 'the Composer autoloader (see Core::preloadConfigurationHint()).', (string) ini_get('ffi.enable'), )); } diff --git a/tests/CoreInitializationTest.php b/tests/CoreInitializationTest.php index 4dfc46c0..989d537a 100644 --- a/tests/CoreInitializationTest.php +++ b/tests/CoreInitializationTest.php @@ -47,4 +47,38 @@ public function testPreloadIsIdempotentAfterTheAutomaticBoot(): void Core::preload(); $this->assertTrue(Core::isInitialized()); } + + public function testEngineHeaderPathIsTheBundledHeaderOfTheRunningBuild(): void + { + $header = Core::engineHeaderPath(); + + $this->assertFileExists($header); + $this->assertStringEndsWith( + str_replace('/', DIRECTORY_SEPARATOR, 'include/' . Core::platformKey() . '/engine.h'), + $header, + ); + } + + public function testPreloadScriptPathIsTheBundledScript(): void + { + $this->assertSame(realpath(dirname(__DIR__) . '/preload.php'), Core::preloadScriptPath()); + } + + /** + * The hint is what Core::init() throws under ffi.enable=preload in a web SAPI: it has to + * carry the resolved paths, so the operator can paste it into php.ini as is + */ + public function testPreloadConfigurationHintCarriesTheResolvedPaths(): void + { + $hint = Core::preloadConfigurationHint(); + + $this->assertStringContainsString('ffi.preload=' . Core::engineHeaderPath(), $hint); + if (PHP_OS_FAMILY === 'Windows') { + $this->assertStringContainsString('ffi.enable=1', $hint); + $this->assertStringNotContainsString('opcache.preload=', $hint); + } else { + $this->assertStringContainsString('opcache.preload=' . Core::preloadScriptPath(), $hint); + $this->assertStringContainsString('opcache.preload_user', $hint); + } + } } diff --git a/tests/PreloadModeTest.php b/tests/PreloadModeTest.php new file mode 100644 index 00000000..19d1b3e4 --- /dev/null +++ b/tests/PreloadModeTest.php @@ -0,0 +1,197 @@ + + * + * 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; + +use PHPUnit\Framework\TestCase; + +/** + * Booting under PHP's default `ffi.enable=preload` in a web SAPI + * + * In that mode the FFI API is restricted, outside the CLI, to code that opcache.preload + * compiled at server start. The CLI is exempt, so the cases here run the php-cgi binary that + * ships next to the CLI one: its SAPI is "cgi-fcgi", which is restricted exactly like php-fpm. + * Each case needs its own process, because the thing under test is the state a process starts + * in. The suite skips where no php-cgi sits next to PHP_BINARY; the opcache.preload cases also + * need the opcache extension and a platform that has opcache.preload at all (not Windows). + */ +final class PreloadModeTest extends TestCase +{ + /** + * Without a preload stage the bridge cannot bind, and the exception has to be the php.ini + * recipe with the paths resolved for this build - not a hint to call a method the + * operator has no place to call from + */ + public function testInitExplainsThePreloadConfigurationWhenNothingWasPreloaded(): void + { + $result = $this->runCgi(['ffi.enable=preload'], <<<'PHP' + try { + \ZEngine\Core::init(); + echo 'booted'; + } catch (\RuntimeException $e) { + echo $e->getMessage(); + } + PHP); + + self::assertSame(0, $result['exit'], $result['stderr']); + self::assertStringContainsString('ffi.enable=preload', $result['stdout']); + self::assertStringContainsString('ffi.preload=' . Core::engineHeaderPath(), $result['stdout']); + if (PHP_OS_FAMILY === 'Windows') { + self::assertStringContainsString('ffi.enable=1', $result['stdout']); + } else { + self::assertStringContainsString('opcache.preload=' . Core::preloadScriptPath(), $result['stdout']); + } + } + + /** + * The recipe the exception gives has to work: with the bundled script preloaded, a + * request process in preload mode binds the engine and uses it like the CLI would + */ + public function testPreloadingTheBundledScriptServesARequestInPreloadMode(): void + { + $this->requireOpcachePreload(); + + $result = $this->runCgi( + ['ffi.enable=preload', ...$this->opcachePreloadOptions()], + self::USE_THE_ENGINE, + ); + + self::assertSame('', $result['stderr']); + self::assertSame('booted hello', $result['stdout']); + } + + /** + * ffi.preload publishes the scope at module startup; the preload stage then has to take + * that scope instead of loading the header into it a second time - which crashed the + * whole server start with a segmentation fault + */ + public function testFfiPreloadAndOpcachePreloadCanBeCombined(): void + { + $this->requireOpcachePreload(); + + $result = $this->runCgi( + ['ffi.enable=preload', 'ffi.preload=' . Core::engineHeaderPath(), ...$this->opcachePreloadOptions()], + self::USE_THE_ENGINE, + ); + + self::assertSame('', $result['stderr']); + self::assertSame(0, $result['exit'], 'the process died - a crash in the preload stage shows as a signal exit'); + self::assertSame('booted hello', $result['stdout']); + } + + /** + * Under ffi.enable=1 the header published by ffi.preload is what the bridge binds to, + * without any opcache.preload stage + */ + public function testFfiPreloadServesARequestWhenFfiIsFullyEnabled(): void + { + if (PHP_OS_FAMILY === 'Windows') { + self::markTestSkipped('ffi.preload of the FFI_LIB-bound Windows header is not verified yet'); + } + + $result = $this->runCgi( + ['ffi.enable=1', 'ffi.preload=' . Core::engineHeaderPath()], + self::USE_THE_ENGINE, + ); + + self::assertSame('', $result['stderr']); + self::assertSame('booted hello', $result['stdout']); + } + + /** + * A probe that needs the bridge bound AND makes an engine call through a wrapper that + * the preload stage did not necessarily touch + */ + private const string USE_THE_ENGINE = <<<'PHP' + \ZEngine\Core::init(); + echo 'booted ', \ZEngine\Type\StringEntry::fromString('hello')->getStringValue(); + PHP; + + private function requireOpcachePreload(): void + { + if (!extension_loaded('Zend OPcache')) { + self::markTestSkipped('Preloading needs the opcache extension'); + } + if (PHP_OS_FAMILY === 'Windows') { + self::markTestSkipped('opcache.preload is not available on Windows (issue #119)'); + } + } + + /** + * @return list + */ + private function opcachePreloadOptions(): array + { + $options = ['opcache.enable=1', 'opcache.preload=' . Core::preloadScriptPath()]; + // PHP refuses to preload as root unless told which user to drop to (see AutoBootTest) + if (function_exists('posix_geteuid') && posix_geteuid() === 0) { + $entry = function_exists('posix_getpwuid') ? posix_getpwuid(0) : false; + $options[] = 'opcache.preload_user=' . ($entry === false ? 'root' : $entry['name']); + } + + return $options; + } + + /** + * Runs the probe (after requiring the autoloader) in a php-cgi process with the given + * ini settings on top of the suite's baseline (opcache loaded, JIT off) + * + * @param list $iniSettings + * @return array{exit: int, stdout: string, stderr: string} + */ + private function runCgi(array $iniSettings, string $probe): array + { + $cgi = dirname(PHP_BINARY) . DIRECTORY_SEPARATOR . 'php-cgi' . (PHP_OS_FAMILY === 'Windows' ? '.exe' : ''); + if (!is_executable($cgi)) { + self::markTestSkipped("no php-cgi next to the running PHP ({$cgi})"); + } + + $script = tempnam(sys_get_temp_dir(), 'z-engine-cgi-'); + self::assertNotFalse($script); + file_put_contents($script, sprintf( + " ['pipe', 'w'], 2 => ['pipe', 'w']], $pipes); + self::assertIsResource($process, 'could not start a php-cgi process'); + + $stdout = (string) stream_get_contents($pipes[1]); + $stderr = (string) stream_get_contents($pipes[2]); + fclose($pipes[1]); + fclose($pipes[2]); + + return ['exit' => proc_close($process), 'stdout' => trim($stdout), 'stderr' => trim($stderr)]; + } finally { + @unlink($script); + } + } +} From 9c93abf2955b045d7b5028cb03d14f1d67417a23 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Nov 2026 00:25:35 +0000 Subject: [PATCH 02/14] fix(core): repoint the class-name cache at the live class after a hot swap HotSwap compiles the new source as a donor class under the same name. When the donor has a parent or interfaces, zend_do_link_class() stores it in the engine's per-name class-entry cache. HotSwap republished the live entry in the class table but left that cache pointing at the donor, so any later lookup by an interned name (new ReflectionClass('Foo'), new Foo, ...) returned the donor after it was destroyed on apply() or discard(): a use-after-free. A PHP debug build catches it as a hash-table consistency abort in ClassDeltaTest::testRemovedOverrideRestoresInheritedMethod; release builds read freed memory silently. ReflectionClass::bindClassNameCache() now repoints the slot, and HotSwap calls it right after republishing the live class. The new regression test compares class-entry addresses, so it fails on release builds too. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FxhC1Ec16gRujMto2EbKdR --- src/HotSwap/HotSwap.php | 4 ++++ src/Reflection/ReflectionClass.php | 30 ++++++++++++++++++++++++++++++ src/Type/StringEntry.php | 3 ++- tests/HotSwap/ClassDeltaTest.php | 19 +++++++++++++++++++ 4 files changed, 55 insertions(+), 1 deletion(-) diff --git a/src/HotSwap/HotSwap.php b/src/HotSwap/HotSwap.php index df89b02f..e9cbf998 100644 --- a/src/HotSwap/HotSwap.php +++ b/src/HotSwap/HotSwap.php @@ -207,6 +207,10 @@ private static function compileDonorClass( self::unpublishClassEntry($lowerName); } self::publishClassEntry($lowerName, $liveClass); + // Linking the donor (a class with a parent or interfaces) memoized it in the + // engine's class-name cache. Repoint that slot at the live entry, or every later + // lookup by name resolves the donor, which is destroyed on apply or discard. + $liveClass->bindClassNameCache($donorClass); } if ($compileError !== null) { diff --git a/src/Reflection/ReflectionClass.php b/src/Reflection/ReflectionClass.php index 56087fdd..522690cb 100644 --- a/src/Reflection/ReflectionClass.php +++ b/src/Reflection/ReflectionClass.php @@ -782,6 +782,36 @@ public function copyOutOfSharedMemory(): void } } + /** + * Points the engine's fast class-name cache at this class entry + * + * A class lookup by an interned name reads a memoized per-request slot BEFORE the + * class table, and the engine fills that slot itself whenever it links a class + * (zend_do_link_class). Code that swaps the entry a name resolves to behind the + * engine's back must repoint the slot too, or lookups keep returning the old entry. + * + * @param ReflectionClass|null $namesake Another entry declared under the same name + * whose name string must stop resolving to it + * + * @internal shared with the hot-swap machinery (HotSwap) + */ + public function bindClassNameCache(?ReflectionClass $namesake = null): void + { + $nameStrings = [$this->pointer->name]; + if ($namesake !== null) { + // Usually the same interned string, but nothing guarantees it + $nameStrings[] = $namesake->pointer->name; + } + foreach ($nameStrings as $nameString) { + // Engine invariant: every class entry carries a name + assert($nameString !== null); + $nameEntry = StringEntry::fromCData($nameString); + if ($nameEntry->hasClassEntryCache()) { + $nameEntry->setCachedClassEntry($this->pointer); + } + } + } + /** * Returns the raw zend_class_entry pointer this reflection wraps * diff --git a/src/Type/StringEntry.php b/src/Type/StringEntry.php index 59dac5bf..a662ae20 100644 --- a/src/Type/StringEntry.php +++ b/src/Type/StringEntry.php @@ -16,6 +16,7 @@ use FFI\CData; use ReflectionClass; use ZEngine\Core; +use ZEngine\Generated\zend_class_entry; use ZEngine\Generated\zend_refcounted_h; use ZEngine\Generated\zend_string; use ZEngine\Memory\Allocator; @@ -335,7 +336,7 @@ public function hasClassEntryCache(): bool * sites compiled into cached scripts read the memoized entry, not the table, so without * this refresh they would keep dispatching the shared-memory class entry. * - * @param CData $classEntry zend_class_entry the name must resolve to from now on + * @param CData|zend_class_entry $classEntry zend_class_entry the name must resolve to from now on * * @see zend_types.h:ZSTR_SET_CE_CACHE */ diff --git a/tests/HotSwap/ClassDeltaTest.php b/tests/HotSwap/ClassDeltaTest.php index d28bcd41..4c39e002 100644 --- a/tests/HotSwap/ClassDeltaTest.php +++ b/tests/HotSwap/ClassDeltaTest.php @@ -20,6 +20,7 @@ use ZEngine\ClassExtension\ObjectCreateTrait; use ZEngine\OpCache\SharedMemoryException; use ZEngine\Reflection\ReflectionClass; +use ZEngine\Type\ObjectEntry; class ClassDeltaTest extends TestCase { @@ -139,6 +140,24 @@ public function testRemovedOverrideRestoresInheritedMethod(): void $this->assertSame('base', self::callMethod($restoredInstance, 'speak')); } + public function testNameLookupResolvesLiveClassAfterSwapOfLinkedClass(): void + { + $baseName = 'HotSwapBaseForNameCache'; + $className = 'HotSwapNameCacheTarget'; + eval("class {$baseName} {}"); + eval("class {$className} extends {$baseName} { public function speak(): string { return \"live\"; } }"); + $liveAddress = (new ReflectionClass($className))->getAddress(); + + // Linking a donor with a parent stores it in the engine's class-name cache. A lookup + // by name must still reach the live entry once the donor is destroyed, on discard + // as well as on apply. + HotSwap::prepare($className, "class {$className} extends {$baseName} {}")->discard(); + $this->assertSame($liveAddress, (new ObjectEntry(self::newInstance($className)))->getClass()->getAddress()); + + HotSwap::prepare($className, "class {$className} extends {$baseName} {}")->apply(); + $this->assertSame($liveAddress, (new ObjectEntry(self::newInstance($className)))->getClass()->getAddress()); + } + public function testConstantChangeAndAddition(): void { $className = $this->declareClass('Const', '{ public const VERSION = 1; }'); From 04230ef2de6b003a798372e82c64830e913c5e6b Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Nov 2026 00:34:12 +0000 Subject: [PATCH 03/14] chore(gen): regenerate 8.4 linux headers for PHP 8.4.27 PHP 8.4.27 added two engine fields: - zend_compiler_globals.interned_strings_fallible (_Bool, in the former padding at offset 443, so ast stays at 448) - zend_executor_globals.delayed_oom (new zend_oom_info struct, appended at the end; EG grows 1960 -> 1984 bytes, 2128 -> 2152 on ZTS) No existing offset moves. Regenerated with `composer gen-headers` (docker, php:8.4); the darwin and windows targets follow from their workflows. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FxhC1Ec16gRujMto2EbKdR --- .phpstorm.meta.php | 4 ++++ include/8.4/linux-x64-nts/engine.h | 14 ++++++++++++++ include/8.4/linux-x64-nts/layouts.json | 6 ++++-- include/8.4/linux-x64-nts/probe.c | 2 ++ include/8.4/linux-x64-zts/engine.h | 14 ++++++++++++++ include/8.4/linux-x64-zts/layouts.json | 6 ++++-- include/8.4/linux-x64-zts/probe.c | 2 ++ stubs/zend-engine-structs.php | 17 +++++++++++++++++ 8 files changed, 61 insertions(+), 4 deletions(-) diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index cde6a496..09a18f05 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -68,6 +68,7 @@ 'zend_object_iterator' => \ZEngine\Generated\zend_object_iterator::class, 'zend_object_iterator_funcs' => \ZEngine\Generated\zend_object_iterator_funcs::class, 'zend_objects_store' => \ZEngine\Generated\zend_objects_store::class, + 'zend_oom_info' => \ZEngine\Generated\zend_oom_info::class, 'zend_op' => \ZEngine\Generated\zend_op::class, 'zend_op_array' => \ZEngine\Generated\zend_op_array::class, 'zend_oparray_context' => \ZEngine\Generated\zend_oparray_context::class, @@ -150,6 +151,7 @@ 'zend_object_iterator' => \ZEngine\Generated\zend_object_iterator::class, 'zend_object_iterator_funcs' => \ZEngine\Generated\zend_object_iterator_funcs::class, 'zend_objects_store' => \ZEngine\Generated\zend_objects_store::class, + 'zend_oom_info' => \ZEngine\Generated\zend_oom_info::class, 'zend_op' => \ZEngine\Generated\zend_op::class, 'zend_op_array' => \ZEngine\Generated\zend_op_array::class, 'zend_oparray_context' => \ZEngine\Generated\zend_oparray_context::class, @@ -285,6 +287,8 @@ 'zend_object_iterator_funcs *' => \ZEngine\Generated\zend_object_iterator_funcs::class, 'zend_objects_store' => \ZEngine\Generated\zend_objects_store::class, 'zend_objects_store *' => \ZEngine\Generated\zend_objects_store::class, + 'zend_oom_info' => \ZEngine\Generated\zend_oom_info::class, + 'zend_oom_info *' => \ZEngine\Generated\zend_oom_info::class, 'zend_op' => \ZEngine\Generated\zend_op::class, 'zend_op *' => \ZEngine\Generated\zend_op::class, 'zend_op_array' => \ZEngine\Generated\zend_op_array::class, diff --git a/include/8.4/linux-x64-nts/engine.h b/include/8.4/linux-x64-nts/engine.h index 46c9f7f3..1bbd4b47 100644 --- a/include/8.4/linux-x64-nts/engine.h +++ b/include/8.4/linux-x64-nts/engine.h @@ -155,6 +155,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -732,6 +744,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -834,6 +847,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/linux-x64-nts/layouts.json b/include/8.4/linux-x64-nts/layouts.json index f59407b3..0b9a4d7e 100644 --- a/include/8.4/linux-x64-nts/layouts.json +++ b/include/8.4/linux-x64-nts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 1960, + "size": 1984, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -391,7 +391,8 @@ "max_allowed_stack_size": 1816, "reserved_stack_size": 1824, "strtod_state": 1832, - "reserved": 1912 + "reserved": 1912, + "delayed_oom": 1960 } }, "zend_compiler_globals": { @@ -428,6 +429,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/linux-x64-nts/probe.c b/include/8.4/linux-x64-nts/probe.c index 7818a692..c25be328 100644 --- a/include/8.4/linux-x64-nts/probe.c +++ b/include/8.4/linux-x64-nts/probe.c @@ -1268,6 +1268,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1302,6 +1303,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.4/linux-x64-zts/engine.h b/include/8.4/linux-x64-zts/engine.h index 4198c4a1..2cb3c355 100644 --- a/include/8.4/linux-x64-zts/engine.h +++ b/include/8.4/linux-x64-zts/engine.h @@ -250,6 +250,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -820,6 +832,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -926,6 +939,7 @@ struct _zend_executor_globals { struct sigaction oldact; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/linux-x64-zts/layouts.json b/include/8.4/linux-x64-zts/layouts.json index c5835d3f..70b136ac 100644 --- a/include/8.4/linux-x64-zts/layouts.json +++ b/include/8.4/linux-x64-zts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 2128, + "size": 2152, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -394,7 +394,8 @@ "pid": 1840, "oldact": 1848, "strtod_state": 2000, - "reserved": 2080 + "reserved": 2080, + "delayed_oom": 2128 } }, "zend_compiler_globals": { @@ -431,6 +432,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/linux-x64-zts/probe.c b/include/8.4/linux-x64-zts/probe.c index 467a8377..8a3c9284 100644 --- a/include/8.4/linux-x64-zts/probe.c +++ b/include/8.4/linux-x64-zts/probe.c @@ -1271,6 +1271,7 @@ int main(void) { 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)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1305,6 +1306,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/stubs/zend-engine-structs.php b/stubs/zend-engine-structs.php index 2a6991c0..81d23153 100644 --- a/stubs/zend-engine-structs.php +++ b/stubs/zend-engine-structs.php @@ -622,6 +622,7 @@ final class zend_compiler_globals public bool $multibyte; public bool $detect_unicode; public bool $encoding_declared; + public bool $interned_strings_fallible; public ?zend_ast $ast; public ?zend_arena $ast_arena; public zend_stack $delayed_oplines_stack; @@ -809,6 +810,7 @@ final class zend_executor_globals public int $reserved_stack_size; public zend_strtod_state $strtod_state; public \FFI\CData $reserved; + public zend_oom_info $delayed_oom; private function __construct() {} } @@ -1284,6 +1286,21 @@ final class zend_objects_store private function __construct() {} } +/** + * Analysis-only view of the engine C struct 'zend_oom_info'; the runtime value is always FFI\CData. + * + * @internal + */ +final class zend_oom_info +{ + public int $state; + public int $lineno; + public ?zend_string $message; + public ?zend_string $filename; + + private function __construct() {} +} + /** * Analysis-only view of the engine C struct 'zend_op'; the runtime value is always FFI\CData. * From 2aaa27959c84381ca42b1c282091ac21dd470ae8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:35:07 +0000 Subject: [PATCH 04/14] Generate darwin FFI engine definitions for PHP 8.4 (#58) --- include/8.4/darwin-arm64-nts/engine.h | 14 ++++++++++++++ include/8.4/darwin-arm64-nts/layouts.json | 6 ++++-- include/8.4/darwin-arm64-nts/probe.c | 2 ++ include/8.4/darwin-arm64-zts/engine.h | 14 ++++++++++++++ include/8.4/darwin-arm64-zts/layouts.json | 6 ++++-- include/8.4/darwin-arm64-zts/probe.c | 2 ++ include/8.4/darwin-x64-nts/engine.h | 14 ++++++++++++++ include/8.4/darwin-x64-nts/layouts.json | 6 ++++-- include/8.4/darwin-x64-nts/probe.c | 2 ++ include/8.4/darwin-x64-zts/engine.h | 14 ++++++++++++++ include/8.4/darwin-x64-zts/layouts.json | 6 ++++-- include/8.4/darwin-x64-zts/probe.c | 2 ++ 12 files changed, 80 insertions(+), 8 deletions(-) diff --git a/include/8.4/darwin-arm64-nts/engine.h b/include/8.4/darwin-arm64-nts/engine.h index 442ab4ab..e5435770 100644 --- a/include/8.4/darwin-arm64-nts/engine.h +++ b/include/8.4/darwin-arm64-nts/engine.h @@ -158,6 +158,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -728,6 +740,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -830,6 +843,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/darwin-arm64-nts/layouts.json b/include/8.4/darwin-arm64-nts/layouts.json index f59407b3..0b9a4d7e 100644 --- a/include/8.4/darwin-arm64-nts/layouts.json +++ b/include/8.4/darwin-arm64-nts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 1960, + "size": 1984, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -391,7 +391,8 @@ "max_allowed_stack_size": 1816, "reserved_stack_size": 1824, "strtod_state": 1832, - "reserved": 1912 + "reserved": 1912, + "delayed_oom": 1960 } }, "zend_compiler_globals": { @@ -428,6 +429,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/darwin-arm64-nts/probe.c b/include/8.4/darwin-arm64-nts/probe.c index 7818a692..c25be328 100644 --- a/include/8.4/darwin-arm64-nts/probe.c +++ b/include/8.4/darwin-arm64-nts/probe.c @@ -1268,6 +1268,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1302,6 +1303,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.4/darwin-arm64-zts/engine.h b/include/8.4/darwin-arm64-zts/engine.h index 740605b6..55ba9d24 100644 --- a/include/8.4/darwin-arm64-zts/engine.h +++ b/include/8.4/darwin-arm64-zts/engine.h @@ -159,6 +159,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -729,6 +741,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -832,6 +845,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/darwin-arm64-zts/layouts.json b/include/8.4/darwin-arm64-zts/layouts.json index 96180389..a5f5c86b 100644 --- a/include/8.4/darwin-arm64-zts/layouts.json +++ b/include/8.4/darwin-arm64-zts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 1960, + "size": 1984, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -391,7 +391,8 @@ "max_allowed_stack_size": 1816, "reserved_stack_size": 1824, "strtod_state": 1832, - "reserved": 1912 + "reserved": 1912, + "delayed_oom": 1960 } }, "zend_compiler_globals": { @@ -428,6 +429,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/darwin-arm64-zts/probe.c b/include/8.4/darwin-arm64-zts/probe.c index 6582029e..cc0f398f 100644 --- a/include/8.4/darwin-arm64-zts/probe.c +++ b/include/8.4/darwin-arm64-zts/probe.c @@ -1268,6 +1268,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1302,6 +1303,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.4/darwin-x64-nts/engine.h b/include/8.4/darwin-x64-nts/engine.h index ae2356be..b4a3fc95 100644 --- a/include/8.4/darwin-x64-nts/engine.h +++ b/include/8.4/darwin-x64-nts/engine.h @@ -158,6 +158,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -728,6 +740,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -830,6 +843,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/darwin-x64-nts/layouts.json b/include/8.4/darwin-x64-nts/layouts.json index f59407b3..0b9a4d7e 100644 --- a/include/8.4/darwin-x64-nts/layouts.json +++ b/include/8.4/darwin-x64-nts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 1960, + "size": 1984, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -391,7 +391,8 @@ "max_allowed_stack_size": 1816, "reserved_stack_size": 1824, "strtod_state": 1832, - "reserved": 1912 + "reserved": 1912, + "delayed_oom": 1960 } }, "zend_compiler_globals": { @@ -428,6 +429,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/darwin-x64-nts/probe.c b/include/8.4/darwin-x64-nts/probe.c index 7818a692..c25be328 100644 --- a/include/8.4/darwin-x64-nts/probe.c +++ b/include/8.4/darwin-x64-nts/probe.c @@ -1268,6 +1268,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1302,6 +1303,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.4/darwin-x64-zts/engine.h b/include/8.4/darwin-x64-zts/engine.h index 5a4f8066..80b14678 100644 --- a/include/8.4/darwin-x64-zts/engine.h +++ b/include/8.4/darwin-x64-zts/engine.h @@ -159,6 +159,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -729,6 +741,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -832,6 +845,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/darwin-x64-zts/layouts.json b/include/8.4/darwin-x64-zts/layouts.json index 96180389..a5f5c86b 100644 --- a/include/8.4/darwin-x64-zts/layouts.json +++ b/include/8.4/darwin-x64-zts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 1960, + "size": 1984, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -391,7 +391,8 @@ "max_allowed_stack_size": 1816, "reserved_stack_size": 1824, "strtod_state": 1832, - "reserved": 1912 + "reserved": 1912, + "delayed_oom": 1960 } }, "zend_compiler_globals": { @@ -428,6 +429,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/darwin-x64-zts/probe.c b/include/8.4/darwin-x64-zts/probe.c index 6582029e..cc0f398f 100644 --- a/include/8.4/darwin-x64-zts/probe.c +++ b/include/8.4/darwin-x64-zts/probe.c @@ -1268,6 +1268,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1302,6 +1303,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); From b2f653120154df3cdc7771ef74d31075b1815f4d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 00:35:30 +0000 Subject: [PATCH 05/14] Generate windows FFI engine definitions for PHP 8.4 (#59) --- include/8.4/windows-x64-nts/engine.h | 14 ++++++++++++++ include/8.4/windows-x64-nts/layouts.json | 6 ++++-- include/8.4/windows-x64-nts/probe.c | 2 ++ include/8.4/windows-x64-zts/engine.h | 14 ++++++++++++++ include/8.4/windows-x64-zts/layouts.json | 6 ++++-- include/8.4/windows-x64-zts/probe.c | 2 ++ 6 files changed, 40 insertions(+), 4 deletions(-) diff --git a/include/8.4/windows-x64-nts/engine.h b/include/8.4/windows-x64-nts/engine.h index dcd62bdf..bdb2cb75 100644 --- a/include/8.4/windows-x64-nts/engine.h +++ b/include/8.4/windows-x64-nts/engine.h @@ -172,6 +172,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -747,6 +759,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -850,6 +863,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/windows-x64-nts/layouts.json b/include/8.4/windows-x64-nts/layouts.json index 3a8f2c51..3f6c65c0 100644 --- a/include/8.4/windows-x64-nts/layouts.json +++ b/include/8.4/windows-x64-nts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 2120, + "size": 2144, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -392,7 +392,8 @@ "max_allowed_stack_size": 1976, "reserved_stack_size": 1984, "strtod_state": 1992, - "reserved": 2072 + "reserved": 2072, + "delayed_oom": 2120 } }, "zend_compiler_globals": { @@ -429,6 +430,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/windows-x64-nts/probe.c b/include/8.4/windows-x64-nts/probe.c index 46d7f729..fee34e44 100644 --- a/include/8.4/windows-x64-nts/probe.c +++ b/include/8.4/windows-x64-nts/probe.c @@ -1269,6 +1269,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1303,6 +1304,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.4/windows-x64-zts/engine.h b/include/8.4/windows-x64-zts/engine.h index 71281700..c67d3a35 100644 --- a/include/8.4/windows-x64-zts/engine.h +++ b/include/8.4/windows-x64-zts/engine.h @@ -173,6 +173,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -748,6 +760,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -852,6 +865,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.4/windows-x64-zts/layouts.json b/include/8.4/windows-x64-zts/layouts.json index 00d92079..0efd2463 100644 --- a/include/8.4/windows-x64-zts/layouts.json +++ b/include/8.4/windows-x64-zts/layouts.json @@ -306,7 +306,7 @@ } }, "zend_executor_globals": { - "size": 2120, + "size": 2144, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -392,7 +392,8 @@ "max_allowed_stack_size": 1976, "reserved_stack_size": 1984, "strtod_state": 1992, - "reserved": 2072 + "reserved": 2072, + "delayed_oom": 2120 } }, "zend_compiler_globals": { @@ -429,6 +430,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.4/windows-x64-zts/probe.c b/include/8.4/windows-x64-zts/probe.c index 1b26dbb9..58914dc8 100644 --- a/include/8.4/windows-x64-zts/probe.c +++ b/include/8.4/windows-x64-zts/probe.c @@ -1269,6 +1269,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1303,6 +1304,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); From d52706c8ce2feb0153e3399797b20abbab5ca21f Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Nov 2026 09:04:29 +0000 Subject: [PATCH 06/14] chore(gen): regenerate 8.5 linux headers for PHP 8.5.12 PHP 8.5.12 carries the same engine additions as 8.4.27: - zend_compiler_globals.interned_strings_fallible (_Bool, former padding at offset 443) - zend_executor_globals.delayed_oom (zend_oom_info, appended at the end; EG grows 1984 -> 2008 bytes, 2152 -> 2176 on ZTS) No existing offset moves. Regenerated with `composer gen-headers` (docker, php:8.5). The branch-level stubs and .phpstorm.meta.php regenerate identical to what the cascade merge produced. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FxhC1Ec16gRujMto2EbKdR --- include/8.5/linux-x64-nts/engine.h | 14 ++++++++++++++ include/8.5/linux-x64-nts/layouts.json | 6 ++++-- include/8.5/linux-x64-nts/probe.c | 2 ++ include/8.5/linux-x64-zts/engine.h | 14 ++++++++++++++ include/8.5/linux-x64-zts/layouts.json | 6 ++++-- include/8.5/linux-x64-zts/probe.c | 2 ++ 6 files changed, 40 insertions(+), 4 deletions(-) diff --git a/include/8.5/linux-x64-nts/engine.h b/include/8.5/linux-x64-nts/engine.h index 6058cc64..34a349b7 100644 --- a/include/8.5/linux-x64-nts/engine.h +++ b/include/8.5/linux-x64-nts/engine.h @@ -155,6 +155,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -742,6 +754,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -846,6 +859,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.5/linux-x64-nts/layouts.json b/include/8.5/linux-x64-nts/layouts.json index 676ef2cb..e10f3eb3 100644 --- a/include/8.5/linux-x64-nts/layouts.json +++ b/include/8.5/linux-x64-nts/layouts.json @@ -309,7 +309,7 @@ } }, "zend_executor_globals": { - "size": 1984, + "size": 2008, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -396,7 +396,8 @@ "max_allowed_stack_size": 1840, "reserved_stack_size": 1848, "strtod_state": 1856, - "reserved": 1936 + "reserved": 1936, + "delayed_oom": 1984 } }, "zend_compiler_globals": { @@ -433,6 +434,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.5/linux-x64-nts/probe.c b/include/8.5/linux-x64-nts/probe.c index 9ed96701..1b51135e 100644 --- a/include/8.5/linux-x64-nts/probe.c +++ b/include/8.5/linux-x64-nts/probe.c @@ -1275,6 +1275,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1309,6 +1310,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.5/linux-x64-zts/engine.h b/include/8.5/linux-x64-zts/engine.h index 79db3400..8294a980 100644 --- a/include/8.5/linux-x64-zts/engine.h +++ b/include/8.5/linux-x64-zts/engine.h @@ -250,6 +250,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -830,6 +842,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -938,6 +951,7 @@ struct _zend_executor_globals { struct sigaction oldact; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.5/linux-x64-zts/layouts.json b/include/8.5/linux-x64-zts/layouts.json index b9e19ab3..010f23c2 100644 --- a/include/8.5/linux-x64-zts/layouts.json +++ b/include/8.5/linux-x64-zts/layouts.json @@ -309,7 +309,7 @@ } }, "zend_executor_globals": { - "size": 2152, + "size": 2176, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -399,7 +399,8 @@ "pid": 1864, "oldact": 1872, "strtod_state": 2024, - "reserved": 2104 + "reserved": 2104, + "delayed_oom": 2152 } }, "zend_compiler_globals": { @@ -436,6 +437,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.5/linux-x64-zts/probe.c b/include/8.5/linux-x64-zts/probe.c index c7b65eeb..df96ea31 100644 --- a/include/8.5/linux-x64-zts/probe.c +++ b/include/8.5/linux-x64-zts/probe.c @@ -1278,6 +1278,7 @@ int main(void) { 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)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1312,6 +1313,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); From 4560965625f5cb44f2232916c91eaadb32cad28b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 09:05:43 +0000 Subject: [PATCH 07/14] Generate darwin FFI engine definitions for PHP 8.5 (#58) --- include/8.5/darwin-arm64-nts/engine.h | 14 + include/8.5/darwin-arm64-nts/layouts.json | 6 +- include/8.5/darwin-arm64-nts/probe.c | 2 + include/8.5/darwin-arm64-zts/engine.h | 14 + include/8.5/darwin-arm64-zts/layouts.json | 6 +- include/8.5/darwin-arm64-zts/probe.c | 2 + include/8.5/darwin-x64-nts/engine.h | 14 + include/8.5/darwin-x64-nts/layouts.json | 6 +- include/8.5/darwin-x64-nts/probe.c | 2 + include/8.5/darwin-x64-zts/constants.php | 525 +++++++ include/8.5/darwin-x64-zts/engine.h | 1106 +++++++++++++++ include/8.5/darwin-x64-zts/layouts.json | 696 ++++++++++ include/8.5/darwin-x64-zts/probe.c | 1539 +++++++++++++++++++++ 13 files changed, 3926 insertions(+), 6 deletions(-) create mode 100644 include/8.5/darwin-x64-zts/constants.php create mode 100644 include/8.5/darwin-x64-zts/engine.h create mode 100644 include/8.5/darwin-x64-zts/layouts.json create mode 100644 include/8.5/darwin-x64-zts/probe.c diff --git a/include/8.5/darwin-arm64-nts/engine.h b/include/8.5/darwin-arm64-nts/engine.h index abfc0b08..d862174a 100644 --- a/include/8.5/darwin-arm64-nts/engine.h +++ b/include/8.5/darwin-arm64-nts/engine.h @@ -158,6 +158,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -738,6 +750,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -842,6 +855,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.5/darwin-arm64-nts/layouts.json b/include/8.5/darwin-arm64-nts/layouts.json index 676ef2cb..e10f3eb3 100644 --- a/include/8.5/darwin-arm64-nts/layouts.json +++ b/include/8.5/darwin-arm64-nts/layouts.json @@ -309,7 +309,7 @@ } }, "zend_executor_globals": { - "size": 1984, + "size": 2008, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -396,7 +396,8 @@ "max_allowed_stack_size": 1840, "reserved_stack_size": 1848, "strtod_state": 1856, - "reserved": 1936 + "reserved": 1936, + "delayed_oom": 1984 } }, "zend_compiler_globals": { @@ -433,6 +434,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.5/darwin-arm64-nts/probe.c b/include/8.5/darwin-arm64-nts/probe.c index 9ed96701..1b51135e 100644 --- a/include/8.5/darwin-arm64-nts/probe.c +++ b/include/8.5/darwin-arm64-nts/probe.c @@ -1275,6 +1275,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1309,6 +1310,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.5/darwin-arm64-zts/engine.h b/include/8.5/darwin-arm64-zts/engine.h index a7d6ea35..5dd4f68c 100644 --- a/include/8.5/darwin-arm64-zts/engine.h +++ b/include/8.5/darwin-arm64-zts/engine.h @@ -159,6 +159,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -739,6 +751,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -844,6 +857,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.5/darwin-arm64-zts/layouts.json b/include/8.5/darwin-arm64-zts/layouts.json index 0b9ad97c..5cf6fd08 100644 --- a/include/8.5/darwin-arm64-zts/layouts.json +++ b/include/8.5/darwin-arm64-zts/layouts.json @@ -309,7 +309,7 @@ } }, "zend_executor_globals": { - "size": 1984, + "size": 2008, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -396,7 +396,8 @@ "max_allowed_stack_size": 1840, "reserved_stack_size": 1848, "strtod_state": 1856, - "reserved": 1936 + "reserved": 1936, + "delayed_oom": 1984 } }, "zend_compiler_globals": { @@ -433,6 +434,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.5/darwin-arm64-zts/probe.c b/include/8.5/darwin-arm64-zts/probe.c index 85d03ee3..475feb63 100644 --- a/include/8.5/darwin-arm64-zts/probe.c +++ b/include/8.5/darwin-arm64-zts/probe.c @@ -1275,6 +1275,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1309,6 +1310,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.5/darwin-x64-nts/engine.h b/include/8.5/darwin-x64-nts/engine.h index 81dd2ddd..0832b1c6 100644 --- a/include/8.5/darwin-x64-nts/engine.h +++ b/include/8.5/darwin-x64-nts/engine.h @@ -158,6 +158,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -738,6 +750,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -842,6 +855,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.5/darwin-x64-nts/layouts.json b/include/8.5/darwin-x64-nts/layouts.json index 676ef2cb..e10f3eb3 100644 --- a/include/8.5/darwin-x64-nts/layouts.json +++ b/include/8.5/darwin-x64-nts/layouts.json @@ -309,7 +309,7 @@ } }, "zend_executor_globals": { - "size": 1984, + "size": 2008, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -396,7 +396,8 @@ "max_allowed_stack_size": 1840, "reserved_stack_size": 1848, "strtod_state": 1856, - "reserved": 1936 + "reserved": 1936, + "delayed_oom": 1984 } }, "zend_compiler_globals": { @@ -433,6 +434,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.5/darwin-x64-nts/probe.c b/include/8.5/darwin-x64-nts/probe.c index 9ed96701..1b51135e 100644 --- a/include/8.5/darwin-x64-nts/probe.c +++ b/include/8.5/darwin-x64-nts/probe.c @@ -1275,6 +1275,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1309,6 +1310,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.5/darwin-x64-zts/constants.php b/include/8.5/darwin-x64-zts/constants.php new file mode 100644 index 00000000..102a95ec --- /dev/null +++ b/include/8.5/darwin-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/darwin-x64-zts/engine.h b/include/8.5/darwin-x64-zts/engine.h new file mode 100644 index 00000000..7cb573d6 --- /dev/null +++ b/include/8.5/darwin-x64-zts/engine.h @@ -0,0 +1,1106 @@ +#define FFI_SCOPE "ZEngine" +/* + * Generated by tools/generator for PHP 8.5 (darwin-x64-zts, release) - DO NOT EDIT. + * Regenerate with `composer gen-headers`. + */ +typedef long __darwin_time_t; +typedef __darwin_time_t time_t; +typedef int ts_rsrc_id; +typedef struct __sFILE FILE; +struct __sFILE; +struct exception { + int type; + char *name; + double arg1; + double arg2; + double retval; +}; +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 enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; +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 struct _zend_op *( *zend_vm_opcode_handler_t)(struct _zend_execute_data *execute_data, const struct _zend_op *opline); +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 int sigjmp_buf[((9 * 2) + 3 + 16) + 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; + _Bool interned_strings_fallible; + 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; + zend_strtod_state strtod_state; + void *reserved[6]; + zend_oom_info delayed_oom; +}; +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_deserialize_opcode_handler(zend_op *); +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 zend_class_entry * (*zend_inheritance_cache_get)(zend_class_entry *, zend_class_entry *, zend_class_entry **); +extern zend_class_entry * (*zend_inheritance_cache_add)(zend_class_entry *, zend_class_entry *, zend_class_entry *, zend_class_entry **, HashTable *); +extern char zend_system_id[32]; diff --git a/include/8.5/darwin-x64-zts/layouts.json b/include/8.5/darwin-x64-zts/layouts.json new file mode 100644 index 00000000..5cf6fd08 --- /dev/null +++ b/include/8.5/darwin-x64-zts/layouts.json @@ -0,0 +1,696 @@ +{ + "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": 2008, + "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, + "strtod_state": 1856, + "reserved": 1936, + "delayed_oom": 1984 + } + }, + "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, + "interned_strings_fallible": 443, + "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/darwin-x64-zts/probe.c b/include/8.5/darwin-x64-zts/probe.c new file mode 100644 index 00000000..475feb63 --- /dev/null +++ b/include/8.5/darwin-x64-zts/probe.c @@ -0,0 +1,1539 @@ +#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, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); + fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); + 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); + 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; +} From b2a1dfa5fe6028880701f5cb1dab1e9b0ec32110 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 09:05:52 +0000 Subject: [PATCH 08/14] Generate windows FFI engine definitions for PHP 8.5 (#59) --- include/8.5/windows-x64-nts/engine.h | 14 ++++++++++++++ include/8.5/windows-x64-nts/layouts.json | 6 ++++-- include/8.5/windows-x64-nts/probe.c | 2 ++ include/8.5/windows-x64-zts/engine.h | 14 ++++++++++++++ include/8.5/windows-x64-zts/layouts.json | 6 ++++-- include/8.5/windows-x64-zts/probe.c | 2 ++ 6 files changed, 40 insertions(+), 4 deletions(-) diff --git a/include/8.5/windows-x64-nts/engine.h b/include/8.5/windows-x64-nts/engine.h index 15c57386..6b5523be 100644 --- a/include/8.5/windows-x64-nts/engine.h +++ b/include/8.5/windows-x64-nts/engine.h @@ -172,6 +172,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -757,6 +769,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -862,6 +875,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.5/windows-x64-nts/layouts.json b/include/8.5/windows-x64-nts/layouts.json index a9f6a98a..89a76a83 100644 --- a/include/8.5/windows-x64-nts/layouts.json +++ b/include/8.5/windows-x64-nts/layouts.json @@ -309,7 +309,7 @@ } }, "zend_executor_globals": { - "size": 2144, + "size": 2168, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -397,7 +397,8 @@ "max_allowed_stack_size": 2000, "reserved_stack_size": 2008, "strtod_state": 2016, - "reserved": 2096 + "reserved": 2096, + "delayed_oom": 2144 } }, "zend_compiler_globals": { @@ -434,6 +435,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.5/windows-x64-nts/probe.c b/include/8.5/windows-x64-nts/probe.c index a8517482..d61310d6 100644 --- a/include/8.5/windows-x64-nts/probe.c +++ b/include/8.5/windows-x64-nts/probe.c @@ -1276,6 +1276,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1310,6 +1311,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.5/windows-x64-zts/engine.h b/include/8.5/windows-x64-zts/engine.h index 0dc5da5f..d07c9ffa 100644 --- a/include/8.5/windows-x64-zts/engine.h +++ b/include/8.5/windows-x64-zts/engine.h @@ -173,6 +173,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -758,6 +770,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -864,6 +877,7 @@ struct _zend_executor_globals { zend_ulong reserved_stack_size; zend_strtod_state strtod_state; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.5/windows-x64-zts/layouts.json b/include/8.5/windows-x64-zts/layouts.json index 3bc7865f..4bb2cdac 100644 --- a/include/8.5/windows-x64-zts/layouts.json +++ b/include/8.5/windows-x64-zts/layouts.json @@ -309,7 +309,7 @@ } }, "zend_executor_globals": { - "size": 2144, + "size": 2168, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -397,7 +397,8 @@ "max_allowed_stack_size": 2000, "reserved_stack_size": 2008, "strtod_state": 2016, - "reserved": 2096 + "reserved": 2096, + "delayed_oom": 2144 } }, "zend_compiler_globals": { @@ -434,6 +435,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.5/windows-x64-zts/probe.c b/include/8.5/windows-x64-zts/probe.c index 88975729..7c240339 100644 --- a/include/8.5/windows-x64-zts/probe.c +++ b/include/8.5/windows-x64-zts/probe.c @@ -1276,6 +1276,7 @@ int main(void) { fprintf(layouts, ", \"reserved_stack_size\": %zu", offsetof(zend_executor_globals, reserved_stack_size)); fprintf(layouts, ", \"strtod_state\": %zu", offsetof(zend_executor_globals, strtod_state)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1310,6 +1311,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); From 8b5dc6954a394d0f58672dfb2b2d2524e61a509e Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Nov 2026 09:09:01 +0000 Subject: [PATCH 09/14] docs: list darwin-x64-zts as supported on 8.5 The darwin generator now finds a ZTS PHP 8.5 build on the Intel macOS runner and committed include/8.5/darwin-x64-zts, which the README footnote said would happen automatically. The CI leg that skipped while the target was missing now runs. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FxhC1Ec16gRujMto2EbKdR --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 3fab5d9e..2084bfc2 100644 --- a/README.md +++ b/README.md @@ -43,12 +43,10 @@ Engine memory layouts change between every PHP minor version, so each PHP minor | PHP | OS / Arch / TS | Branch | Status | |-----|----------------|--------|--------| -| 8.5 | linux-x64 (nts, zts), darwin-x64 (nts), darwin-arm64 (nts, zts), windows-x64 (nts, zts) | `master` | ✅ supported¹ | +| 8.5 | linux-x64 (nts, zts), darwin-x64 (nts, zts), darwin-arm64 (nts, zts), windows-x64 (nts, zts) | `master` | ✅ supported | | 8.4 | linux-x64 (nts, zts), darwin-x64 (nts, zts), darwin-arm64 (nts, zts), windows-x64 (nts, zts) | `8.4` | ✅ supported | | 8.0 | linux-x64-nts | `8.0` | 🧊 frozen (legacy) | -¹ `darwin-x64-zts` on 8.5 lands as soon as a ZTS PHP 8.5 build exists for Intel macOS runners — the generation workflow picks it up automatically. - > **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. ## Memory safety & long-running PHP From ee1399e8dd38090513cccf2649b06d25a46b941d Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Nov 2026 09:09:17 +0000 Subject: [PATCH 10/14] docs(agents): drop the missing ZTS PHP 8.5 on Intel note setup-php now provides that build, and include/8.5/darwin-x64-zts is committed. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FxhC1Ec16gRujMto2EbKdR --- AGENTS.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 62313093..3e5143b4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -135,9 +135,9 @@ offsets; the opcache file-cache relocator runs on ZTS since issue #118. The 8.4 artifacts are maintained on the `8.4` branch; `include/8.5/darwin-*` is maintained here - after changing the generator, refresh it with one `workflow_dispatch` run of the workflow on `master`. -A leg whose thread-safety mode setup-php cannot provide (currently ZTS -PHP 8.5 on Intel) skips cleanly and self-heals on a later run; the CI -presence guards keep the gap visible as warnings. +A leg whose thread-safety mode setup-php cannot provide skips cleanly and +self-heals on a later run; the CI presence guards keep the gap visible as +warnings. ### Windows artifacts From 82eda89367cd947d19c5961c72ce04f1464b0d38 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 10:06:48 +0000 Subject: [PATCH 11/14] Generate linux FFI engine definitions for PHP 8.6 --- include/8.6/linux-x64-nts/engine.h | 20 +++++++++++++++++--- include/8.6/linux-x64-nts/layouts.json | 6 ++++-- include/8.6/linux-x64-nts/probe.c | 2 ++ include/8.6/linux-x64-zts/engine.h | 20 +++++++++++++++++--- include/8.6/linux-x64-zts/layouts.json | 6 ++++-- include/8.6/linux-x64-zts/probe.c | 2 ++ stubs/zend-engine-structs.php | 17 +++++++++++++++++ 7 files changed, 63 insertions(+), 10 deletions(-) diff --git a/include/8.6/linux-x64-nts/engine.h b/include/8.6/linux-x64-nts/engine.h index 22a8434e..74b3c184 100644 --- a/include/8.6/linux-x64-nts/engine.h +++ b/include/8.6/linux-x64-nts/engine.h @@ -13,6 +13,9 @@ struct _IO_FILE; typedef struct _IO_FILE FILE; typedef int64_t zend_long; typedef uint64_t zend_ulong; +typedef struct zend_atomic_bool_s { + _Bool value; +} zend_atomic_bool; typedef enum zend_result { SUCCESS = 0, FAILURE = -1, @@ -154,6 +157,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -686,9 +701,6 @@ struct __jmp_buf_tag 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; @@ -763,6 +775,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -873,6 +886,7 @@ struct _zend_executor_globals { zend_vm_stack fiber_vm_stack_page_cache; uint32_t fiber_vm_stack_page_cache_count; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.6/linux-x64-nts/layouts.json b/include/8.6/linux-x64-nts/layouts.json index 065d8c56..a6141b39 100644 --- a/include/8.6/linux-x64-nts/layouts.json +++ b/include/8.6/linux-x64-nts/layouts.json @@ -312,7 +312,7 @@ } }, "zend_executor_globals": { - "size": 2200, + "size": 2224, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -404,7 +404,8 @@ "vm_stack_page_cache_count": 2128, "fiber_vm_stack_page_cache": 2136, "fiber_vm_stack_page_cache_count": 2144, - "reserved": 2152 + "reserved": 2152, + "delayed_oom": 2200 } }, "zend_compiler_globals": { @@ -441,6 +442,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.6/linux-x64-nts/probe.c b/include/8.6/linux-x64-nts/probe.c index 0edb819a..900c06bf 100644 --- a/include/8.6/linux-x64-nts/probe.c +++ b/include/8.6/linux-x64-nts/probe.c @@ -1282,6 +1282,7 @@ int main(void) { fprintf(layouts, ", \"fiber_vm_stack_page_cache\": %zu", offsetof(zend_executor_globals, fiber_vm_stack_page_cache)); fprintf(layouts, ", \"fiber_vm_stack_page_cache_count\": %zu", offsetof(zend_executor_globals, fiber_vm_stack_page_cache_count)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1316,6 +1317,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.6/linux-x64-zts/engine.h b/include/8.6/linux-x64-zts/engine.h index b186eb80..fb5923b3 100644 --- a/include/8.6/linux-x64-zts/engine.h +++ b/include/8.6/linux-x64-zts/engine.h @@ -108,6 +108,9 @@ struct _IO_FILE; typedef struct _IO_FILE FILE; typedef int64_t zend_long; typedef uint64_t zend_ulong; +typedef struct zend_atomic_bool_s { + _Bool value; +} zend_atomic_bool; typedef enum zend_result { SUCCESS = 0, FAILURE = -1, @@ -249,6 +252,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -774,9 +789,6 @@ struct _zend_execute_data { 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; @@ -851,6 +863,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -965,6 +978,7 @@ struct _zend_executor_globals { zend_vm_stack fiber_vm_stack_page_cache; uint32_t fiber_vm_stack_page_cache_count; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.6/linux-x64-zts/layouts.json b/include/8.6/linux-x64-zts/layouts.json index b77744a1..837b6c38 100644 --- a/include/8.6/linux-x64-zts/layouts.json +++ b/include/8.6/linux-x64-zts/layouts.json @@ -312,7 +312,7 @@ } }, "zend_executor_globals": { - "size": 2368, + "size": 2392, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -407,7 +407,8 @@ "vm_stack_page_cache_count": 2296, "fiber_vm_stack_page_cache": 2304, "fiber_vm_stack_page_cache_count": 2312, - "reserved": 2320 + "reserved": 2320, + "delayed_oom": 2368 } }, "zend_compiler_globals": { @@ -444,6 +445,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.6/linux-x64-zts/probe.c b/include/8.6/linux-x64-zts/probe.c index c9858899..24b49cc1 100644 --- a/include/8.6/linux-x64-zts/probe.c +++ b/include/8.6/linux-x64-zts/probe.c @@ -1285,6 +1285,7 @@ int main(void) { fprintf(layouts, ", \"fiber_vm_stack_page_cache\": %zu", offsetof(zend_executor_globals, fiber_vm_stack_page_cache)); fprintf(layouts, ", \"fiber_vm_stack_page_cache_count\": %zu", offsetof(zend_executor_globals, fiber_vm_stack_page_cache_count)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1319,6 +1320,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/stubs/zend-engine-structs.php b/stubs/zend-engine-structs.php index d4683489..0480739e 100644 --- a/stubs/zend-engine-structs.php +++ b/stubs/zend-engine-structs.php @@ -640,6 +640,7 @@ final class zend_compiler_globals public bool $multibyte; public bool $detect_unicode; public bool $encoding_declared; + public bool $interned_strings_fallible; public ?zend_ast $ast; public ?zend_arena $ast_arena; public zend_stack $delayed_oplines_stack; @@ -850,6 +851,7 @@ final class zend_executor_globals public ?_zend_vm_stack $fiber_vm_stack_page_cache; public int $fiber_vm_stack_page_cache_count; public \FFI\CData $reserved; + public zend_oom_info $delayed_oom; private function __construct() {} } @@ -1350,6 +1352,21 @@ final class zend_objects_store private function __construct() {} } +/** + * Analysis-only view of the engine C struct 'zend_oom_info'; the runtime value is always FFI\CData. + * + * @internal + */ +final class zend_oom_info +{ + public int $state; + public int $lineno; + public ?zend_string $message; + public ?zend_string $filename; + + private function __construct() {} +} + /** * Analysis-only view of the engine C struct 'zend_op'; the runtime value is always FFI\CData. * From abe0e22aba7b3eb4388a6a9592d904db4d46761c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 10:08:10 +0000 Subject: [PATCH 12/14] Generate darwin FFI engine definitions for PHP 8.6 (#58) --- include/8.6/darwin-arm64-nts/engine.h | 20 +++++++++++++++++--- include/8.6/darwin-arm64-nts/layouts.json | 6 ++++-- include/8.6/darwin-arm64-nts/probe.c | 2 ++ include/8.6/darwin-arm64-zts/engine.h | 20 +++++++++++++++++--- include/8.6/darwin-arm64-zts/layouts.json | 6 ++++-- include/8.6/darwin-arm64-zts/probe.c | 2 ++ include/8.6/darwin-x64-nts/engine.h | 20 +++++++++++++++++--- include/8.6/darwin-x64-nts/layouts.json | 6 ++++-- include/8.6/darwin-x64-nts/probe.c | 2 ++ include/8.6/darwin-x64-zts/engine.h | 20 +++++++++++++++++--- include/8.6/darwin-x64-zts/layouts.json | 6 ++++-- include/8.6/darwin-x64-zts/probe.c | 2 ++ 12 files changed, 92 insertions(+), 20 deletions(-) diff --git a/include/8.6/darwin-arm64-nts/engine.h b/include/8.6/darwin-arm64-nts/engine.h index 8969a2d2..dbc28b0f 100644 --- a/include/8.6/darwin-arm64-nts/engine.h +++ b/include/8.6/darwin-arm64-nts/engine.h @@ -16,6 +16,9 @@ struct exception { }; typedef int64_t zend_long; typedef uint64_t zend_ulong; +typedef struct zend_atomic_bool_s { + _Bool value; +} zend_atomic_bool; typedef enum zend_result { SUCCESS = 0, FAILURE = -1, @@ -157,6 +160,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -682,9 +697,6 @@ struct _zend_execute_data { typedef int sigjmp_buf[((14 + 8 + 2) * 2) + 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; @@ -759,6 +771,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -869,6 +882,7 @@ struct _zend_executor_globals { zend_vm_stack fiber_vm_stack_page_cache; uint32_t fiber_vm_stack_page_cache_count; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.6/darwin-arm64-nts/layouts.json b/include/8.6/darwin-arm64-nts/layouts.json index 065d8c56..a6141b39 100644 --- a/include/8.6/darwin-arm64-nts/layouts.json +++ b/include/8.6/darwin-arm64-nts/layouts.json @@ -312,7 +312,7 @@ } }, "zend_executor_globals": { - "size": 2200, + "size": 2224, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -404,7 +404,8 @@ "vm_stack_page_cache_count": 2128, "fiber_vm_stack_page_cache": 2136, "fiber_vm_stack_page_cache_count": 2144, - "reserved": 2152 + "reserved": 2152, + "delayed_oom": 2200 } }, "zend_compiler_globals": { @@ -441,6 +442,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.6/darwin-arm64-nts/probe.c b/include/8.6/darwin-arm64-nts/probe.c index 0edb819a..900c06bf 100644 --- a/include/8.6/darwin-arm64-nts/probe.c +++ b/include/8.6/darwin-arm64-nts/probe.c @@ -1282,6 +1282,7 @@ int main(void) { fprintf(layouts, ", \"fiber_vm_stack_page_cache\": %zu", offsetof(zend_executor_globals, fiber_vm_stack_page_cache)); fprintf(layouts, ", \"fiber_vm_stack_page_cache_count\": %zu", offsetof(zend_executor_globals, fiber_vm_stack_page_cache_count)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1316,6 +1317,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.6/darwin-arm64-zts/engine.h b/include/8.6/darwin-arm64-zts/engine.h index d7543510..504c5402 100644 --- a/include/8.6/darwin-arm64-zts/engine.h +++ b/include/8.6/darwin-arm64-zts/engine.h @@ -17,6 +17,9 @@ struct exception { }; typedef int64_t zend_long; typedef uint64_t zend_ulong; +typedef struct zend_atomic_bool_s { + _Bool value; +} zend_atomic_bool; typedef enum zend_result { SUCCESS = 0, FAILURE = -1, @@ -158,6 +161,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -683,9 +698,6 @@ struct _zend_execute_data { typedef int sigjmp_buf[((14 + 8 + 2) * 2) + 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; @@ -760,6 +772,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -871,6 +884,7 @@ struct _zend_executor_globals { zend_vm_stack fiber_vm_stack_page_cache; uint32_t fiber_vm_stack_page_cache_count; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.6/darwin-arm64-zts/layouts.json b/include/8.6/darwin-arm64-zts/layouts.json index edf6ccdb..1b898ed6 100644 --- a/include/8.6/darwin-arm64-zts/layouts.json +++ b/include/8.6/darwin-arm64-zts/layouts.json @@ -312,7 +312,7 @@ } }, "zend_executor_globals": { - "size": 2200, + "size": 2224, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -404,7 +404,8 @@ "vm_stack_page_cache_count": 2128, "fiber_vm_stack_page_cache": 2136, "fiber_vm_stack_page_cache_count": 2144, - "reserved": 2152 + "reserved": 2152, + "delayed_oom": 2200 } }, "zend_compiler_globals": { @@ -441,6 +442,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.6/darwin-arm64-zts/probe.c b/include/8.6/darwin-arm64-zts/probe.c index 0db04361..122e33cc 100644 --- a/include/8.6/darwin-arm64-zts/probe.c +++ b/include/8.6/darwin-arm64-zts/probe.c @@ -1282,6 +1282,7 @@ int main(void) { fprintf(layouts, ", \"fiber_vm_stack_page_cache\": %zu", offsetof(zend_executor_globals, fiber_vm_stack_page_cache)); fprintf(layouts, ", \"fiber_vm_stack_page_cache_count\": %zu", offsetof(zend_executor_globals, fiber_vm_stack_page_cache_count)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1316,6 +1317,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.6/darwin-x64-nts/engine.h b/include/8.6/darwin-x64-nts/engine.h index 8ce98873..17d41c6e 100644 --- a/include/8.6/darwin-x64-nts/engine.h +++ b/include/8.6/darwin-x64-nts/engine.h @@ -16,6 +16,9 @@ struct exception { }; typedef int64_t zend_long; typedef uint64_t zend_ulong; +typedef struct zend_atomic_bool_s { + _Bool value; +} zend_atomic_bool; typedef enum zend_result { SUCCESS = 0, FAILURE = -1, @@ -157,6 +160,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -682,9 +697,6 @@ struct _zend_execute_data { typedef int sigjmp_buf[((9 * 2) + 3 + 16) + 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; @@ -759,6 +771,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -869,6 +882,7 @@ struct _zend_executor_globals { zend_vm_stack fiber_vm_stack_page_cache; uint32_t fiber_vm_stack_page_cache_count; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.6/darwin-x64-nts/layouts.json b/include/8.6/darwin-x64-nts/layouts.json index 065d8c56..a6141b39 100644 --- a/include/8.6/darwin-x64-nts/layouts.json +++ b/include/8.6/darwin-x64-nts/layouts.json @@ -312,7 +312,7 @@ } }, "zend_executor_globals": { - "size": 2200, + "size": 2224, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -404,7 +404,8 @@ "vm_stack_page_cache_count": 2128, "fiber_vm_stack_page_cache": 2136, "fiber_vm_stack_page_cache_count": 2144, - "reserved": 2152 + "reserved": 2152, + "delayed_oom": 2200 } }, "zend_compiler_globals": { @@ -441,6 +442,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.6/darwin-x64-nts/probe.c b/include/8.6/darwin-x64-nts/probe.c index 0edb819a..900c06bf 100644 --- a/include/8.6/darwin-x64-nts/probe.c +++ b/include/8.6/darwin-x64-nts/probe.c @@ -1282,6 +1282,7 @@ int main(void) { fprintf(layouts, ", \"fiber_vm_stack_page_cache\": %zu", offsetof(zend_executor_globals, fiber_vm_stack_page_cache)); fprintf(layouts, ", \"fiber_vm_stack_page_cache_count\": %zu", offsetof(zend_executor_globals, fiber_vm_stack_page_cache_count)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1316,6 +1317,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); diff --git a/include/8.6/darwin-x64-zts/engine.h b/include/8.6/darwin-x64-zts/engine.h index 0842588c..dbf57e5c 100644 --- a/include/8.6/darwin-x64-zts/engine.h +++ b/include/8.6/darwin-x64-zts/engine.h @@ -17,6 +17,9 @@ struct exception { }; typedef int64_t zend_long; typedef uint64_t zend_ulong; +typedef struct zend_atomic_bool_s { + _Bool value; +} zend_atomic_bool; typedef enum zend_result { SUCCESS = 0, FAILURE = -1, @@ -158,6 +161,18 @@ struct _zend_reference { struct _zend_ast_ref { zend_refcounted_h gc; }; +typedef enum _zend_oom_state { + ZEND_OOM_STATE_NONE = 0, + ZEND_OOM_STATE_PENDING, + ZEND_OOM_STATE_HANDLING, + ZEND_OOM_STATE_HANDLED +} zend_oom_state; +typedef struct _zend_oom_info { + zend_oom_state state; + uint32_t lineno; + zend_string *message; + zend_string *filename; +} zend_oom_info; typedef struct _zend_llist_element { struct _zend_llist_element *next; struct _zend_llist_element *prev; @@ -683,9 +698,6 @@ struct _zend_execute_data { typedef int sigjmp_buf[((9 * 2) + 3 + 16) + 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; @@ -760,6 +772,7 @@ struct _zend_compiler_globals { _Bool multibyte; _Bool detect_unicode; _Bool encoding_declared; + _Bool interned_strings_fallible; zend_ast *ast; zend_arena *ast_arena; zend_stack delayed_oplines_stack; @@ -871,6 +884,7 @@ struct _zend_executor_globals { zend_vm_stack fiber_vm_stack_page_cache; uint32_t fiber_vm_stack_page_cache_count; void *reserved[6]; + zend_oom_info delayed_oom; }; typedef enum { ON_TOKEN, diff --git a/include/8.6/darwin-x64-zts/layouts.json b/include/8.6/darwin-x64-zts/layouts.json index edf6ccdb..1b898ed6 100644 --- a/include/8.6/darwin-x64-zts/layouts.json +++ b/include/8.6/darwin-x64-zts/layouts.json @@ -312,7 +312,7 @@ } }, "zend_executor_globals": { - "size": 2200, + "size": 2224, "fields": { "uninitialized_zval": 0, "error_zval": 16, @@ -404,7 +404,8 @@ "vm_stack_page_cache_count": 2128, "fiber_vm_stack_page_cache": 2136, "fiber_vm_stack_page_cache_count": 2144, - "reserved": 2152 + "reserved": 2152, + "delayed_oom": 2200 } }, "zend_compiler_globals": { @@ -441,6 +442,7 @@ "multibyte": 440, "detect_unicode": 441, "encoding_declared": 442, + "interned_strings_fallible": 443, "ast": 448, "ast_arena": 456, "delayed_oplines_stack": 464, diff --git a/include/8.6/darwin-x64-zts/probe.c b/include/8.6/darwin-x64-zts/probe.c index 0db04361..122e33cc 100644 --- a/include/8.6/darwin-x64-zts/probe.c +++ b/include/8.6/darwin-x64-zts/probe.c @@ -1282,6 +1282,7 @@ int main(void) { fprintf(layouts, ", \"fiber_vm_stack_page_cache\": %zu", offsetof(zend_executor_globals, fiber_vm_stack_page_cache)); fprintf(layouts, ", \"fiber_vm_stack_page_cache_count\": %zu", offsetof(zend_executor_globals, fiber_vm_stack_page_cache_count)); fprintf(layouts, ", \"reserved\": %zu", offsetof(zend_executor_globals, reserved)); + fprintf(layouts, ", \"delayed_oom\": %zu", offsetof(zend_executor_globals, delayed_oom)); fputs("}},\n", layouts); fputs(" \"zend_compiler_globals\": {", layouts); fprintf(layouts, "\"size\": %zu, \"fields\": {", sizeof(zend_compiler_globals)); @@ -1316,6 +1317,7 @@ int main(void) { 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, ", \"interned_strings_fallible\": %zu", offsetof(zend_compiler_globals, interned_strings_fallible)); 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)); From 2c29a5b9da81e1cdb0826e1a078118be538a3d38 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Nov 2026 10:09:12 +0000 Subject: [PATCH 13/14] ci: keep .phpstorm.meta.php in the linux generator's stubs artifact actions/upload-artifact skips hidden files unless include-hidden-files is set, so the linux-stubs artifact never carried .phpstorm.meta.php and the commit job could not refresh it. After the PHP 8.6 engine gained delayed_oom / interned_strings_fallible, the generator committed the new stubs but left the meta file stale, and header-drift kept failing. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FxhC1Ec16gRujMto2EbKdR --- .github/workflows/generate-linux-headers.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/generate-linux-headers.yml b/.github/workflows/generate-linux-headers.yml index d673707f..6fbd448e 100644 --- a/.github/workflows/generate-linux-headers.yml +++ b/.github/workflows/generate-linux-headers.yml @@ -132,6 +132,9 @@ jobs: path: | stubs/zend-engine-structs.php .phpstorm.meta.php + # upload-artifact drops dotfiles by default, which silently left + # .phpstorm.meta.php out of the commit + include-hidden-files: true if-no-files-found: error # A single commit job (instead of each runner pushing) serializes both From a758d221ecd21d5d9bbb01b08ffa8f6eb67f734e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 10:09:53 +0000 Subject: [PATCH 14/14] Generate linux FFI engine definitions for PHP 8.6 --- .phpstorm.meta.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index 6018d1a9..75db0c8e 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -71,6 +71,7 @@ 'zend_object_iterator' => \ZEngine\Generated\zend_object_iterator::class, 'zend_object_iterator_funcs' => \ZEngine\Generated\zend_object_iterator_funcs::class, 'zend_objects_store' => \ZEngine\Generated\zend_objects_store::class, + 'zend_oom_info' => \ZEngine\Generated\zend_oom_info::class, 'zend_op' => \ZEngine\Generated\zend_op::class, 'zend_op_array' => \ZEngine\Generated\zend_op_array::class, 'zend_oparray_context' => \ZEngine\Generated\zend_oparray_context::class, @@ -156,6 +157,7 @@ 'zend_object_iterator' => \ZEngine\Generated\zend_object_iterator::class, 'zend_object_iterator_funcs' => \ZEngine\Generated\zend_object_iterator_funcs::class, 'zend_objects_store' => \ZEngine\Generated\zend_objects_store::class, + 'zend_oom_info' => \ZEngine\Generated\zend_oom_info::class, 'zend_op' => \ZEngine\Generated\zend_op::class, 'zend_op_array' => \ZEngine\Generated\zend_op_array::class, 'zend_oparray_context' => \ZEngine\Generated\zend_oparray_context::class, @@ -297,6 +299,8 @@ 'zend_object_iterator_funcs *' => \ZEngine\Generated\zend_object_iterator_funcs::class, 'zend_objects_store' => \ZEngine\Generated\zend_objects_store::class, 'zend_objects_store *' => \ZEngine\Generated\zend_objects_store::class, + 'zend_oom_info' => \ZEngine\Generated\zend_oom_info::class, + 'zend_oom_info *' => \ZEngine\Generated\zend_oom_info::class, 'zend_op' => \ZEngine\Generated\zend_op::class, 'zend_op *' => \ZEngine\Generated\zend_op::class, 'zend_op_array' => \ZEngine\Generated\zend_op_array::class,