summaryrefslogtreecommitdiffhomepage
path: root/php.html.markdown
diff options
context:
space:
mode:
authorwillianjusten <willianjustenqui@gmail.com>2015-10-03 21:00:47 -0300
committerwillianjusten <willianjustenqui@gmail.com>2015-10-03 21:00:47 -0300
commit5578db0705e0fe05c40e5cad404fae47767eafa9 (patch)
treeb2588868f4ae66387dd78572a451f0230b03c561 /php.html.markdown
parent46d509077f10fc9b04aaf69829526d4b8297798d (diff)
parent9b46fe7e57bcf63785b67cdaffc49ff0d47d7476 (diff)
Merge remote-tracking branch 'upstream/master'
* upstream/master: Add section on eunit in erlang doc Add clarification on bind / match with = op in erlang. Fixes #1139 Removed random "r" Add to contributors Misc. typos and formatting More explanation on virtual destructors Clarify character literals Fixing typo in julia-es.html.markdown [xml/id] Translated JSON to Indonesian (json-id) [xml/id] Translated XML to Indonesian (xml-id) Aligned the comment block [javascript] Fix for issue 1248 Fixed some grammatical issues/typos Typos fixed in julia-es.html.markdown [c++/pt-br] Fix translate on editing object as parameters Update c++.html.markdown Add lang: to header of Python3 cs-cz file. All class constants can be accessed statically Add `kbd` tag Fixed the description of attributes and elements.
Diffstat (limited to 'php.html.markdown')
-rw-r--r--php.html.markdown4
1 files changed, 3 insertions, 1 deletions
diff --git a/php.html.markdown b/php.html.markdown
index 2d4565e0..3fcce264 100644
--- a/php.html.markdown
+++ b/php.html.markdown
@@ -487,7 +487,7 @@ class MyClass
* 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()
{
@@ -495,7 +495,9 @@ class MyClass
}
}
+// Class constants can always be accessed statically
echo MyClass::MY_CONST; // Outputs 'value';
+
echo MyClass::$staticVar; // Outputs 'static';
MyClass::myStaticMethod(); // Outputs 'I am static';