Commit 9983490424a for php.net
commit 9983490424abee7d1add7a4b785077970ab94cd9
Author: Nicolas Grekas <nicolas.grekas@gmail.com>
Date: Mon Aug 24 16:05:45 2026 +0200
[skip ci] Document the closure $this internals change in UPGRADING.INTERNALS (#23434)
zend_create_closure(), zend_create_fake_closure() and
zend_create_partial_closure() take a zend_object* since fbb2e1f23d6, and
zend_get_closure_this_ptr() returns one since 7a5e452f14c. Neither change
was listed, so extensions built against the new headers get only a
-Wincompatible-pointer-types warning and read garbage at runtime.
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index dc2a35cc9c2..bd671018e03 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -177,6 +177,11 @@ PHP 8.6 INTERNALS UPGRADE NOTES
hand if there is one, E_WARNING for the severity, and
ZEND_ENUM_StreamErrorCode_Generic for the code. terminating should be true
only if the error aborts the operation.
+ . zend_create_closure(), zend_create_fake_closure() and
+ zend_create_partial_closure() now take the bound $this as a zend_object*
+ instead of a zval*. Accordingly, zend_get_closure_this_ptr() now returns
+ that zend_object*, or NULL when the closure is unbound, instead of a
+ zval* that is IS_UNDEF when the closure is unbound.
- Added:
. New zend_class_entry.ce_flags2 and zend_function.fn_flags2 fields were