When the declaration of a PHP class variable we cannot perform any expressions, e.g.:
class A
{
$a = 10 + 5;
}
only we can just provide constants e.g.:
class A
{
$a = 100;
}
Can anybody knows why its like that?
See Question&Answers more detail:os