A

Admin • 833K Points
Coach

Q. Which of the following is the correct way to define a constant in PHP?

  • (A) define('CONSTANT_NAME', 'value');
  • (B) constant('CONSTANT_NAME', 'value');
  • (C) const CONSTANT_NAME = 'value';
  • (D) Both option1 and option3
  • Correct Answer - Option(D)
  • Views: 26
  • Filed under category PHP
  • Hashtags:

Explanation by: Admin

Constants can be defined using define() function or const keyword.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.