note 14324 deleted from function.func-get-args by didou
| From: | didou@php.net | Date: | Thu, 29 May 2003 22:48:45 +0000 |
| Subject: | note 14324 deleted from function.func-get-args by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-49370@lists.php.net to get a copy of this message | ||
Note Submitter: cas1650@spam-is-evil.nebrwesleyan.edu
----
What ak@avatartech.com said above contains an error.
function printme($x) {
print($x);
print(func_get_arg(2));
}
printme("one ","two");
This prints "one" and gives an error. The arglist is zero-based. So
function printme($x) {
print($x);
print(func_get_arg(1));
}
printme("one ","two");
Would print "one two". func_get_arg(0) would return nothing, though, since the first
argument (argument zero) is already in a variable.