From:             guth at fiifo dot u-psud dot fr
Operating system: Linux (mandrake 10)
PHP version:      5.0.1
PHP Bug Type:     Scripting Engine problem
Bug description:  problem with func_get_args()

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 bug report at http://bugs.php.net/?id=30207&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30207&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30207&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30207&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30207&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30207&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30207&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30207&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30207&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30207&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30207&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30207&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30207&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30207&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30207&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30207&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30207&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30207&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30207&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30207&r=mysqlcfg

Reply via email to