The value of a class constant in PHP can be changed after it is defined.

  • TRUE
  • FALSE
  • nan
  • nan
The value of a class constant in PHP cannot be changed after it is defined. Once a constant is assigned a specific value, it remains the same throughout the execution of the script. Constants are considered as read-only values. It's important to note that attempting to modify a constant's value will result in a runtime error. To maintain the immutability of constant values, it is recommended to define them with the desired value and avoid any attempts to modify them later. To know more, 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 *