diff options
author | paierlep <web@paierlep.com> | 2013-07-03 19:50:20 +0200 |
---|---|---|
committer | paierlep <web@paierlep.com> | 2013-07-03 19:50:20 +0200 |
commit | a46ae22bf785bf74334a309c9b2f0a64f5a05659 (patch) | |
tree | 3b4c157fb03f3983fb5b330e524bb6af2caf4021 | |
parent | 8ffd02feff7a82eb5db2daf212589ef0f3621523 (diff) |
Update php.html.markdown
a few sentences to constants
-rw-r--r-- | php.html.markdown | 15 |
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 */ |