Sr. PHP Programmer Question:
Download Questions PDF

How will you define a constant in PHP?

Senior PHP Programmer Interview Question
Senior PHP Programmer Interview Question

Answer:

To define a constant you have to use define() function and to retrieve the value of a constant, you have to simply specifying its name. Unlike with variables, you do not need to have a constant with a $.

Download Senior PHP Programmer Interview Questions And Answers PDF

Previous QuestionNext Question
What are the characteristics of PHP variables?What is the purpose of _FILE_ constant?