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/reflection | |
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/reflection')
-rw-r--r-- | ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt b/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt index da08cc6288..c5a7b72714 100644 --- a/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt +++ b/ext/reflection/tests/ReflectionParameter_canBePassedByValue.phpt @@ -27,7 +27,7 @@ aux('sort'); echo "=> user function:\n\n"; -function ufunc(&$arg1, $arg2) {} +function ufunc(&$array1, $array2) {} aux('ufunc'); @@ -37,7 +37,7 @@ echo "Done.\n"; --EXPECT-- => array_multisort: -Name: arr1 +Name: array1 Is passed by reference: yes Can be passed by value: yes @@ -49,13 +49,13 @@ Name: sort_flags Is passed by reference: yes Can be passed by value: yes -Name: arr2 +Name: arrays Is passed by reference: yes Can be passed by value: yes => sort: -Name: arg +Name: array Is passed by reference: yes Can be passed by value: no @@ -65,11 +65,11 @@ Can be passed by value: yes => user function: -Name: arg1 +Name: array1 Is passed by reference: yes Can be passed by value: no -Name: arg2 +Name: array2 Is passed by reference: no Can be passed by value: yes |