From d92229d8c78aac25925284e23aa7903dca9ed005 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 6 Apr 2020 12:46:52 +0200 Subject: Implement named parameters From an engine perspective, named parameters mainly add three concepts: * The SEND_* opcodes now accept a CONST op2, which is the argument name. For now, it is looked up by linear scan and runtime cached. * This may leave UNDEF arguments on the stack. To avoid having to deal with them in other places, a CHECK_UNDEF_ARGS opcode is used to either replace them with defaults, or error. * For variadic functions, EX(extra_named_params) are collected and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS. RFC: https://wiki.php.net/rfc/named_params Closes GH-5357. --- Zend/zend_interfaces.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zend/zend_interfaces.c') diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c index 37c72ef554..16c193e420 100644 --- a/Zend/zend_interfaces.c +++ b/Zend/zend_interfaces.c @@ -79,7 +79,7 @@ ZEND_API zval* zend_call_method(zend_object *object, zend_class_entry *obj_ce, z called_scope = obj_ce; } - zend_call_known_function(fn, object, called_scope, retval_ptr, param_count, params); + zend_call_known_function(fn, object, called_scope, retval_ptr, param_count, params, NULL); return retval_ptr; } /* }}} */ -- cgit v1.2.1