Re: function parameter question
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: function parameter question

From: Good Man <heyho@letsgo.com>
Date: Tue Jul 19 2005 - 22:39:11 CEST

petermichaux@yahoo.com wrote in news:1121802375.034979.24930
@o13g2000cwo.googlegroups.com:

> Maybe I figured out my question. Does "= array()" simply create an
> default empty array if a second parameter is not supplied in the call
> to the method?

bingo.

same as

function doit ($x=11) {
  //do stuff with $x
}

will give $x a default of 11 if the parameter is not supplied in the call
to the function....
Received on Mon Oct 17 21:11:31 2005