Bug #10432 Updated: Functions as parameters default values
| From: | derick@php.net | Date: | Sat, 21 Apr 2001 14:24:55 +0000 |
| Subject: | Bug #10432 Updated: Functions as parameters default values | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52102@lists.php.net to get a copy of this message | ||
ID: 10432
Updated by: derick
Reported By: pulstar@mail.com
Old-Status: Open
Status: Closed
Bug Type: Feature/Change Request
PHP Version: 4.0.4
Assigned To:
Comments:
Don't think this is neccesairy, as you can do this:
function foo ($param1 = "time")
{
echo $param1();
}
This will execute time(); and show the response.
Derick
Previous Comments:
---------------------------------------------------------------------------
[2001-04-21 10:19:44] pulstar@mail.com
function foo(parameter1, parameter2=value, parameter3=any_php_function(),
parameter4=an_user_function()) {
statments
}
Example:
function foo($anytime=FALSE) {
if(!$anytime) $anytime=time();
statments
}
function foo($anytime=time()) {
statments
}
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10432&edit=2