PHP Constants

My field of study is: Information Science and Technology

My expected Graduation date is: Fall 2025

What are Constants?

In PHP, a constant is a name for a fixed value that cannot be changed during the script execution. Constants are useful for storing values that remain the same, like site names or mathematical values.

Unlike variables, constants do not start with a dollar sign ($) and are defined using the const tag. Once set, their values cannot be modified or reassigned.