This won't work:
class Someclass {
public static $v = '28';
private static $a = Array (
'theNumber' => self::$v
);
}
it yields:
PHP Parse error: syntax error, unexpected '$v' (T_VARIABLE), expecting identifier (T_STRING) or class (T_CLASS)
How can I have theNumber
use a static member of Someclass
as a value?
EDIT: please read the question before answering or "marking as duplicate", this question is not about syntax. It is whether or not it's possible to use a static var in an array (which isn't).