1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-14 10:45:06 +02:00

Merge pull request #284 from ipscott/master

Update php.html.markdown
This commit is contained in:
Adam Bard
2013-08-31 23:11:05 -07:00

View File

@@ -476,10 +476,16 @@ class MyClass
print 'MyClass'; print 'MyClass';
} }
//final keyword would make a function unoverridable
final function youCannotOverrideMe() 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() public static function myStaticMethod()
{ {
print 'I am static'; print 'I am static';