• static-constant-class-folding

    static-constant-class-folding

    此优化将替换编译时的类常量值:

    1. class MyClass
    2. {
    3. const SOME_CONSTANT = 100;
    4. public function getValue()
    5. {
    6. return self::SOME_CONSTANT;
    7. }
    8. }

    转换为:

    1. class MyClass
    2. {
    3. const SOME_CONSTANT = 100;
    4. public function getValue()
    5. {
    6. return 100;
    7. }
    8. }