Skip to content

Commit

Permalink
Update php.html.markdown
Browse files Browse the repository at this point in the history
added a better description for static functions and properties
  • Loading branch information
babaganoush committed Aug 30, 2013
1 parent c7a1136 commit 92e921e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions php.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 92e921e

Please sign in to comment.