summaryrefslogtreecommitdiffhomepage
path: root/php.html.markdown
diff options
context:
space:
mode:
authoripscott <scott.faisal@gmail.com>2013-08-29 23:50:11 -0500
committeripscott <scott.faisal@gmail.com>2013-08-29 23:50:11 -0500
commit92e921e8f3a9138bdb94b19a15cb76081cc90689 (patch)
tree3ae4f97e706b870a2dd247f1ca31f2bbb50ada94 /php.html.markdown
parentc7a1136772588e57a3f9c20be9102a80a6f7f3e8 (diff)
Update php.html.markdown
added a better description for static functions and properties
Diffstat (limited to 'php.html.markdown')
-rw-r--r--php.html.markdown6
1 files changed, 6 insertions, 0 deletions
diff --git a/php.html.markdown b/php.html.markdown
index 1cc6d2c5..aa73c547 100644
--- a/php.html.markdown
+++ b/php.html.markdown
@@ -468,10 +468,16 @@ class MyClass
print 'MyClass';
}
+ //final keyword would make a function unoverridable
final function youCannotOverrideMe()
{
}
+/*
+Declaring class properties or methods as static makes them accessible without needing an instantiation of the class.
+A property declared as static can not be accessed with an instantiated class object (though a static method can).
+*/
+
public static function myStaticMethod()
{
print 'I am static';