{
zend_class_entry *ce = Z_OBJCE_P(object);
zend_class_entry *orig_fake_scope = EG(fake_scope);
+ zend_fcall_info fci;
+ zend_fcall_info_cache fcic;
EG(fake_scope) = NULL;
it should return whether the call was successful or not
*/
- zend_call_method_with_1_params(object, ce, &ce->__get, ZEND_GET_FUNC_NAME, retval, member);
+
+ fci.size = sizeof(fci);
+ fci.object = Z_OBJ_P(object);
+ fci.retval = retval;
+ fci.param_count = 1;
+ fci.params = member;
+ fci.no_separation = 1;
+ ZVAL_UNDEF(&fci.function_name); /* Unused */
+
+ fcic.function_handler = ce->__get;
+ fcic.called_scope = ce;
+ fcic.object = Z_OBJ_P(object);
+
+ zend_call_function(&fci, &fcic);
EG(fake_scope) = orig_fake_scope;
}
{
zend_class_entry *ce = Z_OBJCE_P(object);
zend_class_entry *orig_fake_scope = EG(fake_scope);
+ zend_fcall_info fci;
+ zend_fcall_info_cache fcic;
+ zval args[2], ret;
EG(fake_scope) = NULL;
property name
value to be set
*/
- zend_call_method_with_2_params(object, ce, &ce->__set, ZEND_SET_FUNC_NAME, NULL, member, value);
+
+ ZVAL_COPY_VALUE(&args[0], member);
+ ZVAL_COPY_VALUE(&args[1], value);
+ ZVAL_UNDEF(&ret);
+
+ fci.size = sizeof(fci);
+ fci.object = Z_OBJ_P(object);
+ fci.retval = &ret;
+ fci.param_count = 2;
+ fci.params = args;
+ fci.no_separation = 1;
+ ZVAL_UNDEF(&fci.function_name); /* Unused */
+
+ fcic.function_handler = ce->__set;
+ fcic.called_scope = ce;
+ fcic.object = Z_OBJ_P(object);
+
+ zend_call_function(&fci, &fcic);
+ zval_ptr_dtor(&ret);
EG(fake_scope) = orig_fake_scope;
}
{
zend_class_entry *ce = Z_OBJCE_P(object);
zend_class_entry *orig_fake_scope = EG(fake_scope);
+ zend_fcall_info fci;
+ zend_fcall_info_cache fcic;
+ zval ret;
EG(fake_scope) = NULL;
property name
*/
- zend_call_method_with_1_params(object, ce, &ce->__unset, ZEND_UNSET_FUNC_NAME, NULL, member);
+ ZVAL_UNDEF(&ret);
+
+ fci.size = sizeof(fci);
+ fci.object = Z_OBJ_P(object);
+ fci.retval = &ret;
+ fci.param_count = 1;
+ fci.params = member;
+ fci.no_separation = 1;
+ ZVAL_UNDEF(&fci.function_name); /* Unused */
+
+ fcic.function_handler = ce->__unset;
+ fcic.called_scope = ce;
+ fcic.object = Z_OBJ_P(object);
+
+ zend_call_function(&fci, &fcic);
+ zval_ptr_dtor(&ret);
EG(fake_scope) = orig_fake_scope;
}
{
zend_class_entry *ce = Z_OBJCE_P(object);
zend_class_entry *orig_fake_scope = EG(fake_scope);
+ zend_fcall_info fci;
+ zend_fcall_info_cache fcic;
EG(fake_scope) = NULL;
it should return whether the property is set or not
*/
- zend_call_method_with_1_params(object, ce, &ce->__isset, ZEND_ISSET_FUNC_NAME, retval, member);
+ fci.size = sizeof(fci);
+ fci.object = Z_OBJ_P(object);
+ fci.retval = retval;
+ fci.param_count = 1;
+ fci.params = member;
+ fci.no_separation = 1;
+ ZVAL_UNDEF(&fci.function_name); /* Unused */
+
+ fcic.function_handler = ce->__isset;
+ fcic.called_scope = ce;
+ fcic.object = Z_OBJ_P(object);
+
+ zend_call_function(&fci, &fcic);
EG(fake_scope) = orig_fake_scope;
}
if (destructor) {
zend_object *old_exception;
- zval obj;
zend_class_entry *orig_fake_scope;
+ zend_fcall_info fci;
+ zend_fcall_info_cache fcic;
+ zval ret;
if (destructor->op_array.fn_flags & (ZEND_ACC_PRIVATE|ZEND_ACC_PROTECTED)) {
if (destructor->op_array.fn_flags & ZEND_ACC_PRIVATE) {
}
GC_ADDREF(object);
- ZVAL_OBJ(&obj, object);
/* Make sure that destructors are protected from previously thrown exceptions.
* For example, if an exception was thrown in a function and when the function's
}
orig_fake_scope = EG(fake_scope);
EG(fake_scope) = NULL;
- zend_call_method_with_0_params(&obj, object->ce, &destructor, ZEND_DESTRUCTOR_FUNC_NAME, NULL);
+
+ ZVAL_UNDEF(&ret);
+
+ fci.size = sizeof(fci);
+ fci.object = object;
+ fci.retval = &ret;
+ fci.param_count = 0;
+ fci.params = NULL;
+ fci.no_separation = 1;
+ ZVAL_UNDEF(&fci.function_name); /* Unused */
+
+ fcic.function_handler = destructor;
+ fcic.called_scope = object->ce;
+ fcic.object = object;
+
+ zend_call_function(&fci, &fcic);
+ zval_ptr_dtor(&ret);
+
if (old_exception) {
if (EG(exception)) {
zend_exception_set_previous(EG(exception), old_exception);
EG(exception) = old_exception;
}
}
- zval_ptr_dtor(&obj);
+ OBJ_RELEASE(object);
EG(fake_scope) = orig_fake_scope;
}
}
}
if (old_object->ce->clone) {
- zval new_obj;
+ zend_fcall_info fci;
+ zend_fcall_info_cache fcic;
+ zval ret;
+
+ GC_ADDREF(new_object);
+
+ ZVAL_UNDEF(&ret);
+
+ fci.size = sizeof(fci);
+ fci.object = new_object;
+ fci.retval = &ret;
+ fci.param_count = 0;
+ fci.params = NULL;
+ fci.no_separation = 1;
+ ZVAL_UNDEF(&fci.function_name); /* Unused */
+
+ fcic.function_handler = new_object->ce->clone;
+ fcic.called_scope = new_object->ce;
+ fcic.object = new_object;
- ZVAL_OBJ(&new_obj, new_object);
- Z_ADDREF(new_obj);
- zend_call_method_with_0_params(&new_obj, old_object->ce, &old_object->ce->clone, ZEND_CLONE_FUNC_NAME, NULL);
- zval_ptr_dtor(&new_obj);
+ zend_call_function(&fci, &fcic);
+ zval_ptr_dtor(&ret);
+ OBJ_RELEASE(new_object);
}
}