You can't do that using raw PHP. You can try something like:
function test($var1 = null, $var2 = null){
if($var1 == null) $var1 = 'default1';
if($var2 == null) $var2 = 'default2';
}
and then call your function, with null as the identifier of the default variable. You can also use an array with the default values, that will be easier with a bigger parameter list.
Even better is to try to avoid this all, and rethink your design a bit.