Variable | Constant |
---|---|
$(dollar sign) is mandatory before variable name while declaring. | No need of $ sign to declare constant |
Variables can have Global, local or block scope | Constants have Only Global scope |
Values can be changed. | Values are fixed, cannot be changed. |
$ and variable name without space and a value is required to create or declare a variable | define() or const keyword is used to create a constant |