@@ -14,50 +14,65 @@ PHP 8.7 INTERNALS UPGRADE NOTES
14141. Internal API changes
1515========================
1616
17- - Removed the ZEND_LOG_XOR() macro.
18- - Removed the ZEND_TRUTH() macro.
19- - Removed zend_execute_scripts(). Manually call zend_execute_script() in a loop
20- instead.
21- - Removed ZEND_STATIC_ASSERT(). Use C11 static_assert() directly instead.
22- - Removed zend_atomic.h and the zend_atomic_* types and functions.
23- Use the standard C11 atomic_* types and functions instead.
24- - The sapi_terminate_process() function was removed.
25- - The sapi_force_http_10() function was removed.
26- - The sapi_get_fd() function was removed.
27- - The sapi_get_target_uid() and sapi_get_target_gid() functions were removed.
28- - Removed HAVE_NORETURN and HAVE_NORETURN_ALIAS. ZEND_NORETURN is guaranteed to
29- work.
30- - Redefined ZEND_NORETURN to make use of the [[noreturn]] attribute for C++
31- and C23, which means that ZEND_NORETURN needs to come first in the modifier
32- list. Consider using noreturn (C11) / [[noreturn]] (C23) directly if
33- header interoperability is not required.
34- - The signature of zend_is_callable() has been changed to
35- zend_is_callable(const zval *callable, zend_fcall_info_cache *fcc, char **error)
36- from zend_is_callable(const zval *callable, uint32_t check_flags, zend_string **callable_name).
37- This new signature covers the most common parameters used with zend_is_callable_ex().
38- - Removed zend_hrtime_posix_clock_id. zend_hrtime() always uses CLOCK_MONOTONIC
39- on POSIX platforms.
40- - Function pointer signature for interface_gets_implemented has been made void.
41- Implementations are expected to use zend_error_noreturn upon failure.
42- - Added a new zend_object_copy() function which increases the refcount of
43- a zend_object* and returns it. Allowing more descriptive code rather than
44- doing an assignment followed by GC_ADDREF().
45- - Added zend_call_method_if_exists_ex() which accepts named parameters and
46- retrieving the callability failure error message.
47- - The INIT_CLASS_ENTRY_INIT_METHODS() macro, which was previously used as
48- part of handling disabled classes, was removed following the removal of
49- the `disable_classes` INI setting in PHP 8.5.
50- - Using zend_array_destroy() on HashTables with a custom pDestructor is not
51- allowed anymore. User-facing HashTables must have pDestructor = ZVAL_PTR_DTOR
52- or NULL, and must be freed with zend_array_destroy(). Other HashTables can be
53- freed with zend_hash_destroy() + pefree().
54- - CG(), EG(), PG(), SG(), CWDG(), SIGG(), ZCG(), JIT_G() and INI_SCNG() use
55- native TLS in ZTS builds. The compiler_globals_offset, executor_globals_offset,
56- core_globals_offset, sapi_globals_offset, cwd_globals_offset,
57- zend_signal_globals_offset, accel_globals_offset, jit_globals_offset and
58- ini_scanner_globals_offset symbols have been removed.
59- - php_reserve_tsrm_memory() has been removed.
60- - Removed zend_error_noreturn_unchecked().
17+ - Breaking changes:
18+ . Added zend_module_entry.child_init_func, an optional void callback invoked
19+ by php_child_init() in the child process after core child initialization.
20+ It runs in module dependency order for started modules and may run before a
21+ request starts or during an active request. Initialize it with a designated
22+ initializer such as `.child_init_func = callback` after
23+ STANDARD_MODULE_PROPERTIES_EX.
24+ . Function pointer signature for interface_gets_implemented has been made
25+ void. Implementations are expected to use zend_error_noreturn upon failure.
26+ . Redefined ZEND_NORETURN to make use of the [[noreturn]] attribute for C++
27+ and C23, which means that ZEND_NORETURN needs to come first in the modifier
28+ list. Consider using noreturn (C11) / [[noreturn]] (C23) directly if
29+ header interoperability is not required.
30+ . Using zend_array_destroy() on HashTables with a custom pDestructor is not
31+ allowed anymore. User-facing HashTables must have pDestructor = ZVAL_PTR_DTOR
32+ or NULL, and must be freed with zend_array_destroy(). Other HashTables can
33+ be freed with zend_hash_destroy() + pefree().
34+
35+ - Removed:
36+ . The ZEND_LOG_XOR() macro was removed.
37+ . The ZEND_TRUTH() macro was removed.
38+ . Removed zend_execute_scripts(). Manually call zend_execute_script() in a
39+ loop instead.
40+ . Removed ZEND_STATIC_ASSERT(). Use C11 static_assert() directly instead.
41+ . Removed zend_atomic.h and the zend_atomic_* types and functions.
42+ Use the standard C11 atomic_* types and functions instead.
43+ . The zend_error_noreturn_unchecked() function was removed.
44+ . The sapi_terminate_process() function was removed.
45+ . The sapi_force_http_10() function was removed.
46+ . The sapi_get_fd() function was removed.
47+ . The sapi_get_target_uid() function was removed.
48+ . The sapi_get_target_gid() function was removed.
49+ . Removed zend_hrtime_posix_clock_id. zend_hrtime() always uses
50+ CLOCK_MONOTONIC on POSIX platforms.
51+ . The INIT_CLASS_ENTRY_INIT_METHODS() macro, which was previously used as
52+ part of handling disabled classes, was removed following the removal of
53+ the `disable_classes` INI setting in PHP 8.5.
54+ . Removed HAVE_NORETURN and HAVE_NORETURN_ALIAS. ZEND_NORETURN is guaranteed
55+ to work.
56+ . CG(), EG(), PG(), SG(), CWDG(), SIGG(), ZCG(), JIT_G() and INI_SCNG() use
57+ native TLS in ZTS builds. The compiler_globals_offset, executor_globals_offset,
58+ core_globals_offset, sapi_globals_offset, cwd_globals_offset,
59+ zend_signal_globals_offset, accel_globals_offset, jit_globals_offset and
60+ ini_scanner_globals_offset symbols have been removed.
61+ . php_reserve_tsrm_memory() has been removed.
62+
63+ - Changed:
64+ . The signature of zend_is_callable() has been changed to
65+ zend_is_callable(const zval *callable, zend_fcall_info_cache *fcc, char **error)
66+ from zend_is_callable(const zval *callable, uint32_t check_flags, zend_string **callable_name).
67+ This new signature covers the most common parameters used with
68+ zend_is_callable_ex().
69+
70+ - Added:
71+ . The zend_object_copy() function was added to increases the refcount of a
72+ zend_object* and returns it. Allowing more descriptive code rather than
73+ doing an assignment followed by GC_ADDREF().
74+ . The zend_call_method_if_exists_ex() was added to accepts named parameters
75+ and retrieving the callability failure error message.
6176
6277========================
63782. Build system changes
@@ -95,6 +110,10 @@ PHP 8.7 INTERNALS UPGRADE NOTES
95110- Standard:
96111 . php_explode() now takes a HashTable* instead of a zval* to store the
97112 resulting parts. It already expected the zval* to be IS_ARRAY.
113+ . _php_math_basetozval() now returns zend_result instead of void. It throws
114+ an exception and returns FAILURE if the input contains invalid characters
115+ for the given base.
116+ . php_dl() has been removed, use php_load_extension() instead.
98117
99118========================
1001194. OpCode changes
0 commit comments