Bug #14306 Updated: Need a something to pass to use default function values
| From: | zak@php.net | Date: | Sun, 02 Dec 2001 04:18:29 +0000 |
| Subject: | Bug #14306 Updated: Need a something to pass to use default function values | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72239@lists.php.net to get a copy of this message | ||
ID: 14306
Updated by: zak
Reported By: mikep@oeone.com
Status: Open
Bug Type: Feature/Change Request
Operating System:
PHP Version: 4.1.0
New Comment:
This issue has been raised on this list and on the Zend
Engine mailing list. IIRC it has always been shot down.
Perhaps review the list archives to see what has been
discussed in the past, consider the arguments and - if you
still desire the feature - present your case again.
Personally, if I wanted the feature, I would think that a
syntax like:
my_function ('arg 1', ,'arg 3);
would look/work best...
Good luck!
Previous Comments:
------------------------------------------------------------------------
[2001-11-30 17:49:54] mikep@oeone.com
I would like a way to pass something into a function and have it use the default values.
For eg., if I have the function
function test( $value, $value1=1, $value2=2 )
and I call it like test( "value", "", "2" ) I think it should use 1
for $value1. It currently does not, but I'd like to be able to pass something in to make it
use the default value, like:
test( "value", NULL, "2" )
I know you can rewrite the function to test for $value1="", but I'd rather not do
that.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14306&edit=1