Lines Matching refs:scope
68 zend_closure *closure, zval *newthis, zend_class_entry *scope) /* {{{ */ in zend_valid_closure_binding() argument
78 if (is_fake_closure && func->common.scope && in zend_valid_closure_binding()
79 !instanceof_function(Z_OBJCE_P(newthis), func->common.scope)) { in zend_valid_closure_binding()
82 ZSTR_VAL(func->common.scope->name), in zend_valid_closure_binding()
87 } else if (is_fake_closure && func->common.scope in zend_valid_closure_binding()
97 if (scope && scope != func->common.scope && scope->type == ZEND_INTERNAL_CLASS) { in zend_valid_closure_binding()
100 ZSTR_VAL(scope->name)); in zend_valid_closure_binding()
104 if (is_fake_closure && scope != func->common.scope) { in zend_valid_closure_binding()
105 if (func->common.scope == NULL) { in zend_valid_closure_binding()
179 my_function->common.scope = newclass; in ZEND_METHOD()
187 && (closure->func.common.scope != newclass in ZEND_METHOD()
225 ce = closure->func.common.scope; in do_closure_bind()
292 EX(func)->internal_function.scope->__callstatic : EX(func)->internal_function.scope->__call; in ZEND_NAMED_FUNCTION()
333 if (!mptr->common.scope) { in zend_create_closure_from_callable()
337 if (!mptr->common.scope->__callstatic) { in zend_create_closure_from_callable()
341 if (!mptr->common.scope->__call) { in zend_create_closure_from_callable()
351 call.scope = mptr->common.scope; in zend_create_closure_from_callable()
359 zend_create_fake_closure(return_value, mptr, mptr->common.scope, fcc.called_scope, &instance); in zend_create_closure_from_callable()
361 zend_create_fake_closure(return_value, mptr, mptr->common.scope, fcc.called_scope, NULL); in zend_create_closure_from_callable()
433 if (lhs->func.common.scope != rhs->func.common.scope) { in zend_closure_compare()
467 invoke->internal_function.scope = zend_ce_closure; in zend_get_closure_invoke_method()
540 closure->func.common.scope, closure->called_scope, &closure->this_ptr); in zend_closure_clone()
576 if (closure->func.common.scope) { in zend_closure_get_debug_info()
577 zend_string *class_name = closure->func.common.scope->name; in zend_closure_get_debug_info()
708 static void zend_create_closure_ex(zval *res, zend_function *func, zend_class_entry *scope, zend_cl… in zend_create_closure_ex() argument
717 if ((scope == NULL) && this_ptr && (Z_TYPE_P(this_ptr) != IS_UNDEF)) { in zend_create_closure_ex()
720 scope = zend_ce_closure; in zend_create_closure_ex()
754 || func->common.scope != scope in zend_create_closure_ex()
759 && (func->common.scope == scope || in zend_create_closure_ex()
763 if (func->common.scope != scope) { in zend_create_closure_ex()
764 func->common.scope = scope; in zend_create_closure_ex()
791 if (!func->common.scope) { in zend_create_closure_ex()
794 scope = NULL; in zend_create_closure_ex()
801 closure->func.common.scope = scope; in zend_create_closure_ex()
803 if (scope) { in zend_create_closure_ex()
812 ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_entry *scope, zend_cla… in zend_create_closure() argument
814 zend_create_closure_ex(res, func, scope, called_scope, this_ptr, in zend_create_closure()
818 ZEND_API void zend_create_fake_closure(zval *res, zend_function *func, zend_class_entry *scope, zen… in zend_create_fake_closure() argument
822 zend_create_closure_ex(res, func, scope, called_scope, this_ptr, /* is_fake */ true); in zend_create_fake_closure()
851 trampoline.scope = mptr->common.scope; in zend_closure_from_frame()
860 zend_create_fake_closure(return_value, mptr, mptr->common.scope, Z_OBJCE(instance), &instance); in zend_closure_from_frame()
862 zend_create_fake_closure(return_value, mptr, mptr->common.scope, Z_CE(call->This), NULL); in zend_closure_from_frame()