Page 178 - CITS - Computer Software Application -TT
P. 178
COMPUTER SOFTWARE APPLICATION - CITS
File: constant1.php
Create a constant with case-insensitive name:
File: constant2.php
File: constant3.php
PHP constant: const keyword
PHP introduced a keyword const to create a constant. The const keyword defines constants at compile time. It is
a language construct, not a function. The constant defined using const keyword are case-sensitive.
File: constant4.php
Constant() function
There is another way to print the value of constants using constant() function instead of using the echo statement.
165
CITS : IT&ITES - Computer Software Application - Lesson 47 - 62