diff options
author | Jonathan Klein <jonathan.n.klein@gmail.com> | 2015-10-01 07:37:05 -0400 |
---|---|---|
committer | Jonathan Klein <jonathan.n.klein@gmail.com> | 2015-10-01 07:37:05 -0400 |
commit | 222cfcd15c7539fd4d2340e5e70cbf3f6b6e087b (patch) | |
tree | acac5cee6cf6da6aeaae49df1144f430e5466832 | |
parent | 1717ee9d881366c069cbb6b3b9eab1a3050d3b4a (diff) |
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 2d4565e0..5cc6a785 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'; |