note 5239 modified in Function arguments by zak
| From: | zak@php.net | Date: | Tue, 12 Dec 2000 07:56:18 +0000 |
| Subject: | note 5239 modified in Function arguments by zak | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8637@lists.php.net to get a copy of this message | ||
You may pass any number of extra parameters to a function, regardless of the prototyping.
For example:
function printme ($x) {
print $x;
print (func_get_arg (1));
}
printme ("one ","two");
<br>This prints "one two".
<p>In the above function, func_get_arg(1) will return nothing, because the first argument has
already been shunted into a variable.
# Editor's Note
# The above example and the assertion based on it
# is incorrect.
#
# The function definition should
http://www.php.net/manual/function-arguments.php