ID: 30207 Updated by: [EMAIL PROTECTED] Reported By: guth at fiifo dot u-psud dot fr Status: Open -Bug Type: Feature/Change Request +Bug Type: Documentation problem Operating System: Linux (mandrake 10) PHP Version: 5.0.1 New Comment:
Correct, changing to documentation problem. Previous Comments: ------------------------------------------------------------------------ [2004-09-23 15:06:06] guth at fiifo dot u-psud dot fr There is a documentation error then. "Returns an array in which each element is the corresponding member of the current user-defined function's argument list." doesn't mean "arguments passed to the function". For function haricow(), a list of arguments would be { $a, $b } ------------------------------------------------------------------------ [2004-09-23 14:55:29] [EMAIL PROTECTED] No bug here, func_get_args() returns the arguments *passed* to the functoin. ------------------------------------------------------------------------ [2004-09-23 14:47:33] [EMAIL PROTECTED] No bug here, func_get_args() returns the arguments *passed* to the functoin. ------------------------------------------------------------------------ [2004-09-23 13:49:32] guth at fiifo dot u-psud dot fr Description: ------------ (bad english...) There is a problem with functions func_[a-z]+_arg[s]?\(\). The problem can be a documentation error, a PHP bug, or a feature request (at your choice). I think that func_get_args() should return facultative arguments. So if it is not a bug, please transform this bug report in a Feature / Change request. It can also be an documentation fix. The actual behavior should be documented. Reproduce code: --------------- <?php function haricow($a, $b = 1) { echo func_num_args(); var_dump(func_get_args()); } haricow(1); Expected result: ---------------- 2 array(2) { [0] => int(1), [1] => int(1) } Actual result: -------------- 1 array(1) { [0] => int(1) } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30207&edit=1