- static-constant-class-folding
static-constant-class-folding
此优化将替换编译时的类常量值:
class MyClass
{
const SOME_CONSTANT = 100;
public function getValue()
{
return self::SOME_CONSTANT;
}
}
转换为:
class MyClass
{
const SOME_CONSTANT = 100;
public function getValue()
{
return 100;
}
}