From b9f07804629a92090b7c7893c204409a0dc10f23 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 24 Aug 2026 14:10:24 +0200 Subject: [PATCH] [skip ci] Document the closure $this internals change in UPGRADING.INTERNALS 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. --- UPGRADING.INTERNALS | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index dc2a35cc9c2c..bd671018e038 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