@@ -4562,25 +4562,6 @@ ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, z
4562
4562
}
4563
4563
}
4564
4564
4565
- /* Virtual properties have no backing storage, the offset should never be used. However, the
4566
- * virtual flag cannot be definitively determined at compile time. Allow using default values
4567
- * anyway, and assert after inheritance that the property is not actually virtual. */
4568
- if (access_type & ZEND_ACC_VIRTUAL ) {
4569
- if (Z_TYPE_P (property ) == IS_UNDEF ) {
4570
- property_info -> offset = OBJ_PROP_TO_OFFSET (ce -> default_properties_count );
4571
- ce -> default_properties_count ++ ;
4572
- ce -> default_properties_table = perealloc (ce -> default_properties_table , sizeof (zval ) * ce -> default_properties_count , ce -> type == ZEND_INTERNAL_CLASS );
4573
- zval * property_default_ptr = & ce -> default_properties_table [OBJ_PROP_TO_NUM (property_info -> offset )];
4574
- ZVAL_UNDEF (property_default_ptr );
4575
- Z_PROP_FLAG_P (property_default_ptr ) = IS_PROP_UNINIT ;
4576
- /* For user classes this is handled during linking */
4577
- if (ce -> type == ZEND_INTERNAL_CLASS ) {
4578
- ce -> properties_info_table = perealloc (ce -> properties_info_table , sizeof (zend_property_info * ) * ce -> default_properties_count , 1 );
4579
- ce -> properties_info_table [ce -> default_properties_count - 1 ] = property_info ;
4580
- }
4581
- goto skip_property_storage ;
4582
- }
4583
- }
4584
4565
if (access_type & ZEND_ACC_STATIC ) {
4585
4566
if ((property_info_ptr = zend_hash_find_ptr (& ce -> properties_info , name )) != NULL ) {
4586
4567
ZEND_ASSERT (property_info_ptr -> flags & ZEND_ACC_STATIC );
@@ -4630,7 +4611,6 @@ ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, z
4630
4611
ZVAL_COPY_VALUE (property_default_ptr , property );
4631
4612
Z_PROP_FLAG_P (property_default_ptr ) = Z_ISUNDEF_P (property ) ? IS_PROP_UNINIT : 0 ;
4632
4613
}
4633
- skip_property_storage :
4634
4614
if (ce -> type & ZEND_INTERNAL_CLASS ) {
4635
4615
/* Must be interned to avoid ZTS data races */
4636
4616
if (is_persistent_class (ce )) {
0 commit comments