History log of /PHP-8.2/Zend/tests/named_params/missing_param.phpt (Results 1 – 3 of 3)
Revision Date Author Comments
# 96f2f317 26-Aug-2020 Larry Garfield

Update array parameter names for named parameters

* The array "subject" of a function gets called $array.

* Further parameters should be self-descriptive if used
as a named pa

Update array parameter names for named parameters

* The array "subject" of a function gets called $array.

* Further parameters should be self-descriptive if used
as a named parameter, and a full word, not an abbreviation.

* If there is a "bunch more arrays" variadic, it gets
called $arrays (because that's what was already there).

* A few functions have a variadic "a bunch more arrays,
and then a callable", and were already called $rest.
I left those as is and died a little inside.

* Any callable provided to an array function that acts
on the array is called $callback. (Nearly all were already,
I just fixed the one or two outliers.)

* array_multisort() is beyond help so I ran screaming.

show more ...


# 1e9a5c67 10-Aug-2020 Tyson Andre

Rename standard array function parameters to $array

This is targeting 8.0.

`$arg` seems like a poor choice of a name,
especially if the function were to have arguments added.

Rename standard array function parameters to $array

This is targeting 8.0.

`$arg` seems like a poor choice of a name,
especially if the function were to have arguments added.

In many cases, the php.net documentation already has $array for these functions.
E.g. https://www.php.net/manual/en/function.array-intersect.php

I'd assume that since named arguments was added to 8.0 near the feature freeze,
PHP's maintainers had planned to make the names consistent
and gradually use the same name for docs and implementation.

show more ...


# d92229d8 06-Apr-2020 Nikita Popov

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 nam

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.

show more ...