Sunday, May 26, 2019

PHP Constants !!

PHP Constants !!


Constants 


Constants in PHP is name or identifier that can not be changed during the execution.

Constant start with letter or underscore is valid.

There is no need of $ sign with constant name.

We can define constant by two methods :




Using define() function 


In this method we use define function().

Syntax 

define (name, value, case-insensitive)

Here, 
name : name of the constant
value : value of the constant
case-insensitive : by default constant is case sensitive.
we can set true or false value of case-insensitive.

Program :


Output :

NibKarma PHP Tutorial!!

In above program msg = constant name, value = Nibkarma PHP Tutorial!!, and by default is case sensitive.

Let's take an example Of Case - sensitive.

Program :


Output :


Case-insensitive - true


When we set  parameter case-insensitive is true. it is not case sensitive.

Program :


Output :

NibKarma PHP Tutorial!!
NibKarma PHP Tutorial!!

Case-insensitive - false

It is case sensitive, it work as by default case-insensitive works.

It generates error of undefined constant.

Program :



Output :


using const keyword


Const keyword define constant at compile time.

It is not a function.

It is always case sensitive.

Syntax :

const name = value ;

Program :


Output :

NibKarma PHP Tutorial!!

In these article we discussed about Constants in PHP. and methods for declare consts define() and const keyword. I hope you learn easily from this article.





Mesothelioma Survival Rates , Mesothelioma Attorneys California , Seattle Mesothelioma Lawyer , Mesothelioma Suit , Mesothelioma Claim , Wisconsin Mesothelioma Attorney , Mesothelioma Attorney illinois , Mesothelioma Trial Attorney ,Houston Mesothelioma Attorney , Mesothelioma Lawyer Dallas , New York Mesothelioma Law Firm,Mesothelioma Lawyer Asbestos Cancer Lawsuit , Mesothelioma Lawyers San Diego,Mesothelioma Litigation , Mesothelioma Attorney Assistance , Mesothelioma Lawyer Asbestos Cancer Lawsuit , Mesothelioma Lawyer Chicago , New York Mesothelioma Law Firm , 


Houston Mesothelioma Attorney , Mesothelioma Lawyer Dallas , Mesothelioma Care , Mesothelioma Trial Attorney , Mesothelioma Lawyer Texas , Lawsuit Mesothelioma  , Truck Accident Attorney Los Angeles ,Asbestos Exposure Lawyers  , Mesothelioma Cases  , Emergency Response Plan ppt , Mesothelioma Lawyers San Diego  , Asbestos Mesothelioma Lawsuit  , Tennessee Mesothelioma Lawyer , Meso Lawyer  , Mesothelioma Settlements Amounts  , Mesothelioma Law Firms , New Mexico Mesothelioma Lawyer , Accident Attorneys Orange County , Mesothelioma Lawsuit ,Personal Injury Accident Lawyer  , Purchase Structured Settlements  , Firm Law Mesothelioma , Car Accident Lawyers Los Angeles , Mesothelioma Attorneys , Structured Settlement Company  , Auto Accident Lawyer San Francisco  , Mesotheolima  , Los Angeles Motorcycle Accident Lawyer


Mesothelioma , Mesothelioma Lawyer Virginia , Seattle Mesothelioma Lawyer , Mesothelioma Attorney illinois , Mesothelioma Drug , Mesothelioma Attorney DirectoryMesothelioma Settlements , Mesothelioma Help  , Mesothelioma ct , Mesothelioma Attorney Florida , Washington Mesothelioma Attorney , Best Mesothelioma Lawyers , Diagnosed With Mesothelioma , Mesothelioma Settlement Amounts , Mesothelioma Personal Injury Lawyers , Mesothelioma Compensation , Attorney Lawyer Mesothelioma  ,Colorado Mesothelioma Lawyers,Mesothelioma Lawsuits , Mesothelioma Claims , Average Mesothelioma Settlement , Average Mesothelioma Settlement , Mesothelioma Law Suit , Alabama Mesothelioma Lawyer , alabama Mesothelioma Lawyer , utah mesothelioma lawyer , Dallas Mesothelioma Lawyer , Mesothelioma Attorney California , Mesothelioma Lawyer California ,Mesothelioma Survival Rates ,

Mesothelioma Attorneys California, Wisconsin Mesothelioma Attorney Mesotheliama , Mesothelioma Lawyer Virginia , Seattle Mesothelioma Lawyer , Mesothelioma Attorney illinois, Mesothelioma Trial Attorney Injury Lawyer Houston tx , Baltimore Mesothelioma Attorneys , Mesothelioma Care ,Mesothelioma Trial Attorney ,Mesothelioma Lawyer Texas , Mesothelioma Lawyer Dallas , Mesothelioma Care , Mesothelioma Trial Attorney , Mesothelioma Lawyer Texas , California Mesothelioma Attorney Philadelphia Mesothelioma Lawyer , Illinois Mesothelioma Lawyer , Mesothelioma Attorney , Mesothelioma Claims , Average Mesothelioma Settlement 
Integrated ehr , Mesothelioma Law Sui , Mesothelioma Lawyer California,Mesothelioma Attorney California ,Mesothelioma Law Suits ,Dallas Mesothelioma Attorneys ,Mesothelioma Drug ,Mesothelioma Attorney Directory