How do you use a class’ static variable as a default argument to one of its methods?
class MyClass
{
public static $MY_CONST = 5;
public function myFunction($var = MyClass::$MY_CONST) {
echo $var;
}
}
I get this error on the method header:
Parse error: syntax error, unexpected T_VARIABLE, expecting T_STRING