From: [EMAIL PROTECTED]
Operating system:
PHP version: 4.2.3
PHP Bug Type: Feature/Change Request
Bug description: skipping an optional argument
Any reason why the following has never been implemented for optional
function arguments?
function test($a, $b = 1, $c = 2)
{
//do something
}
test("hello",,7);
What I would like the test function to see would be
$a = "hello"
$b = 1
$c = 7
Since I skipped the second argument, I would like the default value to
kick in. This would be really useful!
--
Edit bug report at http://bugs.php.net/?id=20706&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20706&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20706&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20706&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20706&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20706&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20706&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20706&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20706&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20706&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20706&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20706&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20706&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20706&r=isapi