Re: Optional pass-by-reference parameters?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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) { /**/ }


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux