|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-04-21 10:19 UTC] pulstar at mail dot 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
}
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 21:00:02 2025 UTC |
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