I\'m trying to provide a member variable as a default value for a class method.
I know it\'s impossible to use a variable as a default value for a non-class function
From the manual:-
The default value must be a constant expression, not (for example) a variable, a class member or a function call.
I'd probably just do something like:-
test = "whatever"; } public function getTest($var=NULL) { if (is_null($var)) { $var = $this->test; } echo $var; } } ?>