Merge pull request #1268 from jklein/patch-1

All class constants can be accessed statically
This commit is contained in:
Levi Bostian 2015-10-02 11:13:21 -05:00
commit 70af92f5c0

View File

@ -495,7 +495,9 @@ class MyClass
} }
} }
// Class constants can always be accessed statically
echo MyClass::MY_CONST; // Outputs 'value'; echo MyClass::MY_CONST; // Outputs 'value';
echo MyClass::$staticVar; // Outputs 'static'; echo MyClass::$staticVar; // Outputs 'static';
MyClass::myStaticMethod(); // Outputs 'I am static'; MyClass::myStaticMethod(); // Outputs 'I am static';