#30207 [Opn->Bgs]: problem with func_get_args()
| From: | derick@php.net | Date: | Thu, 23 Sep 2004 12:55:30 +0000 |
| Subject: | #30207 [Opn->Bgs]: problem with func_get_args() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-66594@lists.php.net to get a copy of this message | ||
ID: 30207
Updated by: derick@php.net
Reported By: guth at fiifo dot u-psud dot fr
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: Linux (mandrake 10)
PHP Version: 5.0.1
New Comment:
No bug here, func_get_args() returns the arguments *passed* to the
functoin.
Previous Comments:
------------------------------------------------------------------------
[2004-09-23 14:47:33] derick@php.net
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