diff options
-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 */ |