Skip to content

Commit fb52b3c

Browse files
committed
[skip-ci] Fix comments and UPGRADING.INTERNALS for zend_type changes
1 parent 89aa42c commit fb52b3c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

UPGRADING.INTERNALS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ PHP 8.1 INTERNALS UPGRADE NOTES
88
e. ZEND_ATOL() changes
99
f. Non-serializable classes should use ZEND_ACC_NOT_SERIALIZABLE
1010
g. _zend_hash_find_known_hash renamed to zend_hash_find_known_hash
11+
h. Renaming of ZEND_TYPE_HAS_CLASS() into ZEND_TYPE_IS_COMPLEX()
1112

1213
2. Build system changes
1314
a. New compiler flags
@@ -53,6 +54,9 @@ PHP 8.1 INTERNALS UPGRADE NOTES
5354
ZEND_ACC_NOT_SERIALIZABLE (@not-serializable in stubs) rather than the
5455
zend_class_(un)serialize_deny handlers which are removed.
5556
g. _zend_hash_find_known_hash has been renamed to zend_hash_find_known_hash.
57+
h. ZEND_TYPE_HAS_CLASS() has been renamed to ZEND_TYPE_IS_COMPLEX() for clarity.
58+
A zend_type element can contain a zend_type_list which might be either a union or an intersection,
59+
or a single class stored as either a zend_string* or a zend_class_entry*.
5660

5761
========================
5862
2. Build system changes

Zend/zend_types.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,11 @@ typedef void (*copy_ctor_func_t)(zval *pElement);
110110
*
111111
* ZEND_TYPE_IS_SET() - checks if there is a type-hint
112112
* ZEND_TYPE_IS_ONLY_MASK() - checks if type-hint refer to standard type only
113-
* ZEND_TYPE_HAS_CLASS() - checks if type-hint contains some class
113+
* ZEND_TYPE_IS_COMPLEX() - checks if type is a type_list, or contains a class either as a CE or as a name
114114
* ZEND_TYPE_HAS_CE() - checks if type-hint contains some class as zend_class_entry *
115115
* ZEND_TYPE_HAS_NAME() - checks if type-hint contains some class as zend_string *
116+
* ZEND_TYPE_IS_INTERSECTION() - checks if the type_list represents an intersection type list
117+
* ZEND_TYPE_IS_UNION() - checks if the type_list represents a union type list
116118
*
117119
* ZEND_TYPE_NAME() - returns referenced class name
118120
* ZEND_TYPE_CE() - returns referenced class entry

0 commit comments

Comments
 (0)