PHP constants

By | January 31, 2014

A constant may be defined as -starts with letter,underscore no $ sign is required like variable definition

this value not change in the entire script.

creating a constant we use the ‘Define’ keyword with 3 parameters

Define(‘constant name’,’value’,’optional parameter tot specify case-sensitive ‘) optional parameter is true.otherwise leave it blank.

case-sensitive constant- blank
case-insensitive constant-true

Example
——–

ouput as below

Welcome to mydoubts.in
mydoubts

output as below
Welcome to mydoubts.in
Welcome to mydoubts.in