@@ -918,7 +918,9 @@ ZEND_API zval *zend_std_read_dimension(zend_object *object, zval *offset, int ty
918
918
919
919
GC_ADDREF (object );
920
920
if (type == BP_VAR_IS ) {
921
- zend_call_method_with_1_params (object , ce , NULL , "offsetexists" , rv , & tmp_offset );
921
+ zend_function * offsetexists =
922
+ zend_hash_find_ptr (& ce -> function_table , ZSTR_KNOWN (ZEND_STR_OFFSETEXISTS ));
923
+ zend_call_known_instance_method_with_1_params (offsetexists , object , rv , & tmp_offset );
922
924
if (UNEXPECTED (Z_ISUNDEF_P (rv ))) {
923
925
OBJ_RELEASE (object );
924
926
zval_ptr_dtor (& tmp_offset );
@@ -933,7 +935,9 @@ ZEND_API zval *zend_std_read_dimension(zend_object *object, zval *offset, int ty
933
935
zval_ptr_dtor (rv );
934
936
}
935
937
936
- zend_call_method_with_1_params (object , ce , NULL , "offsetget" , rv , & tmp_offset );
938
+ zend_function * offsetget =
939
+ zend_hash_find_ptr (& ce -> function_table , ZSTR_KNOWN (ZEND_STR_OFFSETGET ));
940
+ zend_call_known_instance_method_with_1_params (offsetget , object , rv , & tmp_offset );
937
941
938
942
OBJ_RELEASE (object );
939
943
zval_ptr_dtor (& tmp_offset );
@@ -964,7 +968,9 @@ ZEND_API void zend_std_write_dimension(zend_object *object, zval *offset, zval *
964
968
ZVAL_COPY_DEREF (& tmp_offset , offset );
965
969
}
966
970
GC_ADDREF (object );
967
- zend_call_method_with_2_params (object , ce , NULL , "offsetset" , NULL , & tmp_offset , value );
971
+ zend_function * offsetset =
972
+ zend_hash_find_ptr (& ce -> function_table , ZSTR_KNOWN (ZEND_STR_OFFSETSET ));
973
+ zend_call_known_instance_method_with_2_params (offsetset , object , NULL , & tmp_offset , value );
968
974
OBJ_RELEASE (object );
969
975
zval_ptr_dtor (& tmp_offset );
970
976
} else {
@@ -982,11 +988,15 @@ ZEND_API int zend_std_has_dimension(zend_object *object, zval *offset, int check
982
988
if (EXPECTED (zend_class_implements_interface (ce , zend_ce_arrayaccess ) != 0 )) {
983
989
ZVAL_COPY_DEREF (& tmp_offset , offset );
984
990
GC_ADDREF (object );
985
- zend_call_method_with_1_params (object , ce , NULL , "offsetexists" , & retval , & tmp_offset );
991
+ zend_function * offsetexists =
992
+ zend_hash_find_ptr (& ce -> function_table , ZSTR_KNOWN (ZEND_STR_OFFSETEXISTS ));
993
+ zend_call_known_instance_method_with_1_params (offsetexists , object , & retval , & tmp_offset );
986
994
result = i_zend_is_true (& retval );
987
995
zval_ptr_dtor (& retval );
988
996
if (check_empty && result && EXPECTED (!EG (exception ))) {
989
- zend_call_method_with_1_params (object , ce , NULL , "offsetget" , & retval , & tmp_offset );
997
+ zend_function * offsetget =
998
+ zend_hash_find_ptr (& ce -> function_table , ZSTR_KNOWN (ZEND_STR_OFFSETGET ));
999
+ zend_call_known_instance_method_with_1_params (offsetget , object , & retval , & tmp_offset );
990
1000
result = i_zend_is_true (& retval );
991
1001
zval_ptr_dtor (& retval );
992
1002
}
@@ -1163,7 +1173,9 @@ ZEND_API void zend_std_unset_dimension(zend_object *object, zval *offset) /* {{{
1163
1173
if (zend_class_implements_interface (ce , zend_ce_arrayaccess )) {
1164
1174
ZVAL_COPY_DEREF (& tmp_offset , offset );
1165
1175
GC_ADDREF (object );
1166
- zend_call_method_with_1_params (object , ce , NULL , "offsetunset" , NULL , & tmp_offset );
1176
+ zend_function * offsetunset =
1177
+ zend_hash_find_ptr (& ce -> function_table , ZSTR_KNOWN (ZEND_STR_OFFSETUNSET ));
1178
+ zend_call_known_instance_method_with_1_params (offsetunset , object , NULL , & tmp_offset );
1167
1179
OBJ_RELEASE (object );
1168
1180
zval_ptr_dtor (& tmp_offset );
1169
1181
} else {
0 commit comments