#23439 [NEW]: Allow default values to be passed for functions
| From: | steveh at brendata dot co dot uk | Date: | Thu, 01 May 2003 14:38:54 +0000 |
| Subject: | #23439 [NEW]: Allow default values to be passed for functions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-38884@lists.php.net to get a copy of this message | ||
From: steveh at brendata dot co dot uk
Operating system: linux 2.4.20
PHP version: 4.3.1
PHP Bug Type: Feature/Change Request
Bug description: Allow default values to be passed for functions
It would be useful to be able to omit function arguments and have the
function still use the defaults even though some to the right were
passed:
e.g.
function fred ($a,$b=1,$c=2,$d=3)
{
echo "a=$a,b=$b,c=$c,d=$d";
}
fred(-1);
fred(-1,,4,5);
--
Edit bug report at http://bugs.php.net/?id=23439&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23439&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23439&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23439&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23439&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23439&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23439&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23439&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23439&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23439&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23439&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23439&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23439&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23439&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23439&r=gnused