mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-01 20:40:42 +02:00
Merge pull request #96 from paierlep/master
added a few sentences about constants
This commit is contained in:
@@ -100,6 +100,21 @@ END;
|
|||||||
echo 'This string ' . 'is concatenated';
|
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
|
* Arrays
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user