#
53cb8967 |
| 03-Sep-2024 |
DanielEScherzer |
Generated arginfo header files: remove empty zend_function_entry arrays (#15705) When a class (or enum) has no methods, rather than using an array that only contains `ZEND_FE_END`, use `
Generated arginfo header files: remove empty zend_function_entry arrays (#15705) When a class (or enum) has no methods, rather than using an array that only contains `ZEND_FE_END`, use `NULL` for the functions. The implementation of class registration for internal classes, `do_register_internal_class()` in zend_API.c, already skips classes where the functions are `NULL`. By removing these unneeded arrays, we can reduce the size of the header files, while also removing an unneeded call to zend_register_functions() for each internal class with no extra methods.
show more ...
|
#
8d12f666 |
| 24-Aug-2024 |
Máté Kocsis |
Fix registration of internal readonly child classes (#15459) Currently, internal classes are registered with the following code: INIT_CLASS_ENTRY(ce, "InternalClass", class_Internal
Fix registration of internal readonly child classes (#15459) Currently, internal classes are registered with the following code: INIT_CLASS_ENTRY(ce, "InternalClass", class_InternalClass_methods); class_entry = zend_register_internal_class_ex(&ce, NULL); class_entry->ce_flags |= ...; This has worked well so far, except if InternalClass is readonly. It is because some inheritance checks are run by zend_register_internal_class_ex before ZEND_ACC_READONLY_CLASS is added to ce_flags. The issue is fixed by adding a zend_register_internal_class_with_flags() zend API function that stubs can use from now on. This function makes sure to add the flags before running any checks. Since the new API is not available in lower PHP versions, gen_stub.php has to keep support for the existing API for PHP 8.3 and below.
show more ...
|