diff --git a/language/functions.xml b/language/functions.xml index 7e7ee0513cd5..6f0576ba80eb 100644 --- a/language/functions.xml +++ b/language/functions.xml @@ -200,7 +200,31 @@ function takes_array($input) ]]> - + + + As of PHP 8.0.0, the list of function arguments may include a trailing comma, which + will be ignored. That is particularly useful in cases where the list of arguments is + long or contains long variable names, making it convenient to list arguments vertically. + + + Passing arrays to functions + + +]]> + + Passing arguments by reference @@ -885,7 +909,7 @@ $greet('PHP'); Closures may also inherit variables from the parent scope. Any such variables must be passed to the use language construct. - From PHP 7.1, these variables must not include &link.superglobals;, + As of PHP 7.1, these variables must not include &link.superglobals;, $this, or variables with the same name as a parameter. @@ -949,6 +973,10 @@ string(11) "hello world" + + As of PHP 8.0.0, the list of scope-inherited variables may include a trailing + comma, which will be ignored. + Inheriting variables from the parent scope is not the same as using global variables.