@@ -2643,17 +2643,36 @@ ZEND_METHOD(reflection_class, __construct)
2643
2643
Returns an associative array containing all static property values of the class */
2644
2644
ZEND_METHOD (reflection_class , getStaticProperties )
2645
2645
{
2646
- zval * tmp_copy ;
2647
2646
reflection_object * intern ;
2648
2647
zend_class_entry * ce ;
2648
+ HashPosition pos ;
2649
+ zval * * value ;
2649
2650
2650
2651
METHOD_NOTSTATIC_NUMPARAMS (reflection_class_ptr , 0 );
2651
2652
GET_REFLECTION_OBJECT_PTR (ce );
2652
2653
2653
2654
zend_update_class_constants (ce TSRMLS_CC );
2654
2655
2655
2656
array_init (return_value );
2656
- zend_hash_copy (Z_ARRVAL_P (return_value ), CE_STATIC_MEMBERS (ce ), (copy_ctor_func_t ) zval_add_ref , (void * ) & tmp_copy , sizeof (zval * ));
2657
+ zend_hash_internal_pointer_reset_ex (CE_STATIC_MEMBERS (ce ), & pos );
2658
+
2659
+ while (zend_hash_get_current_data_ex (CE_STATIC_MEMBERS (ce ), (void * * ) & value , & pos ) == SUCCESS ) {
2660
+ uint key_len ;
2661
+ zstr key ;
2662
+ ulong num_index ;
2663
+
2664
+ if (zend_hash_get_current_key_ex (CE_STATIC_MEMBERS (ce ), & key , & key_len , & num_index , 0 , & pos ) != FAILURE ) {
2665
+ zstr prop_name , class_name ;
2666
+ int prop_name_len = UG (unicode ) ? u_strlen (prop_name .u ) : strlen (prop_name .s );
2667
+
2668
+ zend_u_unmangle_property_name (UG (unicode )?IS_UNICODE :IS_STRING , key , key_len - 1 , & class_name , & prop_name );
2669
+
2670
+ zval_add_ref (value );
2671
+
2672
+ zend_u_hash_update (Z_ARRVAL_P (return_value ), UG (unicode )?IS_UNICODE :IS_STRING , prop_name , prop_name_len , value , sizeof (zval * ), NULL );
2673
+ }
2674
+ zend_hash_move_forward_ex (CE_STATIC_MEMBERS (ce ), & pos );
2675
+ }
2657
2676
}
2658
2677
/* }}} */
2659
2678
0 commit comments