summaryrefslogtreecommitdiffhomepage
path: root/php.html.markdown
diff options
context:
space:
mode:
authorRob Vella <me@robvella.com>2013-08-12 17:34:17 -0700
committerRob Vella <me@robvella.com>2013-08-12 17:34:17 -0700
commitbbb8c837457eecc95ac3a66db150ed595ff7bb33 (patch)
tree6cae77fb41ae99f1a66408a2fc5365d414f9da3e /php.html.markdown
parentbd48b7062c51aff7d27114326f64fde505cea49c (diff)
Added visibility to static variable declarations
Diffstat (limited to 'php.html.markdown')
-rw-r--r--php.html.markdown5
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;