Lines Matching refs:scope
73 zend_closure *closure, zval *newthis, zend_class_entry *scope) /* {{{ */ in zend_valid_closure_binding() argument
83 if (is_fake_closure && func->common.scope && in zend_valid_closure_binding()
84 !instanceof_function(Z_OBJCE_P(newthis), func->common.scope)) { in zend_valid_closure_binding()
87 ZSTR_VAL(func->common.scope->name), in zend_valid_closure_binding()
92 } else if (is_fake_closure && func->common.scope in zend_valid_closure_binding()
102 if (scope && scope != func->common.scope && scope->type == ZEND_INTERNAL_CLASS) { in zend_valid_closure_binding()
105 ZSTR_VAL(scope->name)); in zend_valid_closure_binding()
109 if (is_fake_closure && scope != func->common.scope) { in zend_valid_closure_binding()
110 if (func->common.scope == NULL) { in zend_valid_closure_binding()
184 my_function->common.scope = newclass; in ZEND_METHOD()
192 && (closure->func.common.scope != newclass in ZEND_METHOD()
230 ce = closure->func.common.scope; in do_closure_bind()
297 EX(func)->internal_function.scope->__callstatic : EX(func)->internal_function.scope->__call; in ZEND_NAMED_FUNCTION()
349 if (!mptr->common.scope) { in zend_create_closure_from_callable()
353 if (!mptr->common.scope->__callstatic) { in zend_create_closure_from_callable()
357 if (!mptr->common.scope->__call) { in zend_create_closure_from_callable()
367 call.scope = mptr->common.scope; in zend_create_closure_from_callable()
376 zend_create_fake_closure(return_value, mptr, mptr->common.scope, fcc.called_scope, &instance); in zend_create_closure_from_callable()
378 zend_create_fake_closure(return_value, mptr, mptr->common.scope, fcc.called_scope, NULL); in zend_create_closure_from_callable()
450 if (lhs->func.common.scope != rhs->func.common.scope) { in zend_closure_compare()
485 invoke->internal_function.scope = zend_ce_closure; in zend_get_closure_invoke_method()
557 closure->func.common.scope, closure->called_scope, &closure->this_ptr); in zend_closure_clone()
593 if (closure->func.common.scope) { in zend_closure_get_debug_info()
594 zend_string *class_name = closure->func.common.scope->name; in zend_closure_get_debug_info()
731 static void zend_create_closure_ex(zval *res, zend_function *func, zend_class_entry *scope, zend_cl… in zend_create_closure_ex() argument
740 if ((scope == NULL) && this_ptr && (Z_TYPE_P(this_ptr) != IS_UNDEF)) { in zend_create_closure_ex()
743 scope = zend_ce_closure; in zend_create_closure_ex()
777 || func->common.scope != scope in zend_create_closure_ex()
782 && (func->common.scope == scope || in zend_create_closure_ex()
786 if (func->common.scope != scope) { in zend_create_closure_ex()
787 func->common.scope = scope; in zend_create_closure_ex()
814 if (!func->common.scope) { in zend_create_closure_ex()
817 scope = NULL; in zend_create_closure_ex()
824 closure->func.common.scope = scope; in zend_create_closure_ex()
826 if (scope) { in zend_create_closure_ex()
835 ZEND_API void zend_create_closure(zval *res, zend_function *func, zend_class_entry *scope, zend_cla… in zend_create_closure() argument
837 zend_create_closure_ex(res, func, scope, called_scope, this_ptr, in zend_create_closure()
841 ZEND_API void zend_create_fake_closure(zval *res, zend_function *func, zend_class_entry *scope, zen… in zend_create_fake_closure() argument
845 zend_create_closure_ex(res, func, scope, called_scope, this_ptr, /* is_fake */ true); in zend_create_fake_closure()
877 trampoline.scope = mptr->common.scope; in zend_closure_from_frame()
890 zend_create_fake_closure(return_value, mptr, mptr->common.scope, Z_OBJCE(instance), &instance); in zend_closure_from_frame()
892 zend_create_fake_closure(return_value, mptr, mptr->common.scope, Z_CE(call->This), NULL); in zend_closure_from_frame()