If you read the manual page regarding default values, I think you'll agree that you'll have to determine some other method of calling your function and/or filling your values.
http://www.phpbuilder.com/manual/functions.arguments.php#functions.arguments.default
This URL states:
"Note that when using default arguments, any defaults should be on the right side of any non-default arguments; otherwise, things will not work as expected."
You could pass an array (name or numerically indexed) to the function.
<?php
function reset_params()
{
$params = array( 'foo1' => 'foo', 'foo2' => 'bar' );
return $params;
}
function testme($foo)
{
print $foo[foo1] . "\n";
print $foo[foo2] . "\n";
}
$arglist = reset_params();
testme( $arglist );
Will print:
foo
bar
$arglist[foo1] = 'fu';
testme( $arglist );
Will print:
fu
bar
$arglist = reset_params();
$arglist[foo2] = 'barians';
testme( $arglist );
Will print:
foo
barians
?>
This isn't a very elegant way of doing things, but it does get the job done.
You could do the same thing with classes...
-Rich