In PHP, you can define a constant in a class using the const keyword like const CONSTANT_NAME = ______.

  • value
  • expression
  • variable
  • string
In PHP, you can define a constant in a class using the const keyword followed by the constant name, the assignment operator =, and the desired value. For example: const CONSTANT_NAME = value; Constants are used to store values that remain the same throughout the execution of a script and cannot be changed once defined. They provide a convenient way to define and use fixed values within a class. Refer to: http://php.net/manual/en/language.constants.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *