Is it possible to set default arguments using variables in a function/method? For example I'm using something like:
function ($arg=$var) {
//code
}
When I use that I get an unexpected T_VARIABLE parse error. For the $var I've tried using $_SERVER["DOCUMENT_ROOT"] and $this->var. This is in a class but I've also tried just a normal function and got the same result. I can set a string as default, ex: $arg="default", and it works fine of corse. Any ideas on this one?
Thanks,
Ryan