diff options
author | Rob Vella <me@robvella.com> | 2013-08-12 17:34:17 -0700 |
---|---|---|
committer | Rob Vella <me@robvella.com> | 2013-08-12 17:34:17 -0700 |
commit | bbb8c837457eecc95ac3a66db150ed595ff7bb33 (patch) | |
tree | 6cae77fb41ae99f1a66408a2fc5365d414f9da3e | |
parent | bd48b7062c51aff7d27114326f64fde505cea49c (diff) |
Added visibility to static variable declarations
-rw-r--r-- | php.html.markdown | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/php.html.markdown b/php.html.markdown index ce228870..083574ee 100644 --- a/php.html.markdown +++ b/php.html.markdown @@ -440,6 +440,11 @@ class MyClass static $staticVar = 'static'; + // Static variables and their visibility + public static $publicStaticVar = 'publicStatic'; + private static $privateStaticVar = 'privateStatic'; // Accessible within the class only + protected static $protectedStaticVar = 'protectedStatic'; // Accessible from the class and subclasses + // Properties must declare their visibility public $property = 'public'; public $instanceProp; |