PHP Tutorials
Php What isPHP INI Tutorials
Php ini What isConstants variables are used to store information which is like variables. The main difference between constants and variables is that constant value cannot be changed in the running program, where in variables value can change.
Return the value of the constant indicated by name.
if you need to take the value of a constant , will not know its name. example it is stored in a variable or returned by a function.
The boolean , integer , float and string can be contained in constants.which is possible to define constants as a resource.
The above example first line has difined Constant. second line produce out put 'Tutorialsscripts'.Third line will output produce notice.
Here some differences between constants and variables:
|
Tweet |
|
|