diff options
author | Levi Bostian <levi.bostian@gmail.com> | 2015-10-02 11:13:21 -0500 |
---|---|---|
committer | Levi Bostian <levi.bostian@gmail.com> | 2015-10-02 11:13:21 -0500 |
commit | 70af92f5c0b5a462fcfa5a94752546d0339baddf (patch) | |
tree | 4d58be7cc3a52ba478fb1afcd99afe1544d77d84 | |
parent | 4a3d5214303fc89f86f2173cfd953829ceba785e (diff) | |
parent | 222cfcd15c7539fd4d2340e5e70cbf3f6b6e087b (diff) |
Merge pull request #1268 from jklein/patch-1
All class constants can be accessed statically
-rw-r--r-- | php.html.markdown | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/php.html.markdown b/php.html.markdown index 52ea2a95..3fcce264 100644 --- a/php.html.markdown +++ b/php.html.markdown @@ -495,7 +495,9 @@ class MyClass } } +// Class constants can always be accessed statically echo MyClass::MY_CONST; // Outputs 'value'; + echo MyClass::$staticVar; // Outputs 'static'; MyClass::myStaticMethod(); // Outputs 'I am static'; |