Q. How can you create a constant in PHP?

  • (A) const NAME = 'value';
  • (B) define('NAME', 'value');
  • (C) constant NAME = 'value';
  • (D) Both 1 and 2
πŸ’¬ Discuss
βœ… Correct Answer: (D) Both 1 and 2
Explanation: PHP allows constants using either define() or const.
Explanation by: Rati Dubey
PHP allows constants using either define() or const.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
87
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
96%
Success Rate