From: Verdon V. <ve...@ve...> - 2006-03-10 13:39:59
|
Thanks :) Clear and succinct answer. vedon On 10-Mar-06, at 7:56 AM, Matthew McNaney wrote: > On Thu, 2006-03-09 at 17:54 -0500, Verdon Vaillancourt wrote: >> 1) >> $search = & new Search($this->key_id); > > Been so long doing this I forgot why I did it. I believe it is because > you just want a reference pointing to the class and not a copy. > >> 2) >> function &cpanel() >> { >> do something; >> } > > This means you are returning a reference point. > function &getit() > { > $a = 1; > return $a; > } > > $b = getit(); > > So instead of creating a new variable ($b) with new memory addresses I > just point to the result of the function. > >> 3) >> function _loadCategory(&$cat_item, &$blog, $version=NULL) >> { >> do something; >> } > > This one is very useful. I can send in a variable, work on it in the > function and then return something different. For example, I could > parse > cat_item, alter the variable, and return TRUE. Also in the example > above, I could alter cat_item and blog at the same time. > > > -- > Matthew McNaney > Electronic Student Services > Appalachian State University > http://phpwebsite.appstate.edu > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers > > |