diff --git a/zend/StandardModule.php b/zend/StandardModule.php index 2047e4e..0d2d3e9 100644 --- a/zend/StandardModule.php +++ b/zend/StandardModule.php @@ -579,9 +579,9 @@ public function startup(): void } if ($this->r_shutdown) - \register_shutdown_function( - \closure_from($this, 'module_destructor') - ); + \register_shutdown_function(function () { + \register_shutdown_function(\closure_from($this, 'module_destructor')); + }); if ($this->restart_sapi) { diff --git a/zend/ThreadsModule.php b/zend/ThreadsModule.php index 4220a5f..7b0e772 100644 --- a/zend/ThreadsModule.php +++ b/zend/ThreadsModule.php @@ -116,9 +116,9 @@ public function startup(): void } if ($this->r_shutdown) - \register_shutdown_function( - \closure_from($this, 'module_destructor') - ); + \register_shutdown_function(function () { + \register_shutdown_function(\closure_from($this, 'module_destructor')); + }); $result = \IS_PHP82 ? \ze_ffi()->php_module_startup(\FFI::addr(\ze_ffi()->sapi_module), null)