diff options
author | Tyson Andre <tysonandre775@hotmail.com> | 2020-08-10 19:48:41 -0400 |
---|---|---|
committer | Tyson Andre <tysonandre775@hotmail.com> | 2020-08-11 19:11:59 -0400 |
commit | 1e9a5c67ef6d075df16d4183abf62e4c99b2f8c6 (patch) | |
tree | 351c1da7bb1c24ad030f5a18edc89c795e27cc22 /ext/standard/array.c | |
parent | 10f660f0a51812ac62e8f03895944e895e553240 (diff) | |
download | php-git-1e9a5c67ef6d075df16d4183abf62e4c99b2f8c6.tar.gz |
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.
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r-- | ext/standard/array.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index de96a46cd5..d20e797781 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -5811,7 +5811,7 @@ PHP_FUNCTION(array_rand) } if (num_req <= 0 || num_req > num_avail) { - zend_argument_value_error(2, "must be between 1 and the number of elements in argument #1 ($arg)"); + zend_argument_value_error(2, "must be between 1 and the number of elements in argument #1 ($array)"); RETURN_THROWS(); } |