Re: Optional pass-by-reference parameters?
| From: | Jochem Maas | Date: | Mon, 27 Feb 2006 20:43:32 +0000 |
| Subject: | Re: Optional pass-by-reference parameters? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231156@lists.php.net to get a copy of this message | ||
TomS wrote:
I would like to have an optional pass-by-reference. i.e. you can call the function w/o the variable. Basically, like how you don't need to pass $matches to the preg_match function. I've tried, function some_func(&$var = null) and this doesn't work. func_get_args only gets copies, does anyone have any other solutions?use php5. the following is from a method that has worked since php5beta3: static function findRange( $className, $order = null, $first = null, $skip = null, $f = null, &$totalcount = null, $trans = false, $autocommit = false, $minimal = false) { /**/ }