Overloading
In Javascript. As for differing amounts of arguments, Javascript really doesn't care about that either.
function bla(a, b, c)
is pretty much the same as
function bla()
except that in the former, a = arguments[0], b = arguments[1], c = arguments[2] in the namespace of the function.
PHP function support variable-length argument list too. And we can set default argument value.
function getFormatedRadioMode($radioMode, $showoff = true) {
global $ap_radioModeTable;
...
}
No comments:
Post a Comment