Difference between define() and const
define() | const keyword |
---|---|
Defines constants at runtime | Defines class constants at compile time |
Can be defined anywhere in the script | Can only be defined within classes or interfaces |
Case-insensitive by default | Case-sensitive by default |
Global scope | Class scope |