Skip to content

Commit 574e531

Browse files
committed
Micro optimization: readonly properties always have a type
1 parent afd8695 commit 574e531

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Zend/zend_API.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -4222,10 +4222,10 @@ ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, z
42224222

42234223
if (ZEND_TYPE_IS_SET(type)) {
42244224
ce->ce_flags |= ZEND_ACC_HAS_TYPE_HINTS;
4225-
}
42264225

4227-
if (access_type & ZEND_ACC_READONLY) {
4228-
ce->ce_flags |= ZEND_ACC_HAS_READONLY_PROPS;
4226+
if (access_type & ZEND_ACC_READONLY) {
4227+
ce->ce_flags |= ZEND_ACC_HAS_READONLY_PROPS;
4228+
}
42294229
}
42304230

42314231
if (ce->type == ZEND_INTERNAL_CLASS) {

0 commit comments

Comments
 (0)