mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Update php.html.markdown
added a better description for static functions and properties
This commit is contained in:
parent
c7a1136772
commit
92e921e8f3
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user