From 1e9a5c67ef6d075df16d4183abf62e4c99b2f8c6 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Mon, 10 Aug 2020 19:48:41 -0400 Subject: 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. --- ext/standard/array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/standard/array.c') 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(); } -- cgit v1.2.1