mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
parent
de4b502fef
commit
05b63b1593
3 changed files with 20 additions and 4 deletions
16
Zend/tests/first_class_callable_016.phpt
Normal file
16
Zend/tests/first_class_callable_016.phpt
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
--TEST--
|
||||||
|
First class callables and &__call()
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
class Foo {
|
||||||
|
public function &__call($method, $args) {
|
||||||
|
return $method;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$foo = new Foo;
|
||||||
|
$bar = $foo->bar(...);
|
||||||
|
echo $bar(),"\n";
|
||||||
|
?>
|
||||||
|
--EXPECT--
|
||||||
|
bar
|
|
@ -4166,7 +4166,7 @@ ZEND_VM_HOT_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL,OBSERVER))
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ZEND_DEBUG
|
#if ZEND_DEBUG
|
||||||
if (!EG(exception) && call->func) {
|
if (!EG(exception) && call->func && !(call->func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE)) {
|
||||||
if (should_throw) {
|
if (should_throw) {
|
||||||
zend_internal_call_arginfo_violation(call->func);
|
zend_internal_call_arginfo_violation(call->func);
|
||||||
}
|
}
|
||||||
|
|
6
Zend/zend_vm_execute.h
generated
6
Zend/zend_vm_execute.h
generated
|
@ -1845,7 +1845,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ZEND_DEBUG
|
#if ZEND_DEBUG
|
||||||
if (!EG(exception) && call->func) {
|
if (!EG(exception) && call->func && !(call->func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE)) {
|
||||||
if (should_throw) {
|
if (should_throw) {
|
||||||
zend_internal_call_arginfo_violation(call->func);
|
zend_internal_call_arginfo_violation(call->func);
|
||||||
}
|
}
|
||||||
|
@ -1954,7 +1954,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ZEND_DEBUG
|
#if ZEND_DEBUG
|
||||||
if (!EG(exception) && call->func) {
|
if (!EG(exception) && call->func && !(call->func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE)) {
|
||||||
if (should_throw) {
|
if (should_throw) {
|
||||||
zend_internal_call_arginfo_violation(call->func);
|
zend_internal_call_arginfo_violation(call->func);
|
||||||
}
|
}
|
||||||
|
@ -2064,7 +2064,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_OBS
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ZEND_DEBUG
|
#if ZEND_DEBUG
|
||||||
if (!EG(exception) && call->func) {
|
if (!EG(exception) && call->func && !(call->func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE)) {
|
||||||
if (should_throw) {
|
if (should_throw) {
|
||||||
zend_internal_call_arginfo_violation(call->func);
|
zend_internal_call_arginfo_violation(call->func);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue