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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…