summaryrefslogtreecommitdiffhomepage
path: root/php.html.markdown
diff options
context:
space:
mode:
authorpaierlep <web@paierlep.com>2013-07-03 19:50:20 +0200
committerpaierlep <web@paierlep.com>2013-07-03 19:50:20 +0200
commita46ae22bf785bf74334a309c9b2f0a64f5a05659 (patch)
tree3b4c157fb03f3983fb5b330e524bb6af2caf4021 /php.html.markdown
parent8ffd02feff7a82eb5db2daf212589ef0f3621523 (diff)
Update php.html.markdown
a few sentences to constants
Diffstat (limited to 'php.html.markdown')
-rw-r--r--php.html.markdown15
1 files changed, 15 insertions, 0 deletions
diff --git a/php.html.markdown b/php.html.markdown
index f0c5c918..c6811282 100644
--- a/php.html.markdown
+++ b/php.html.markdown
@@ -100,6 +100,21 @@ echo 'This string ' . 'is concatenated';
/********************************
+ * Constants
+ */
+
+// A constant is defined by using define()
+// and can never be changed during runtime!
+
+// a valid constant name starts with a letter or underscore,
+// followed by any number of letters, numbers, or underscores.
+define("FOO", "something");
+
+// access to a constant is possible by direct using the choosen name
+echo 'This outputs '.FOO;
+
+
+/********************************
* Arrays
*/