Is PHP a case sensitive language?

In PHP, Variable names are case-sensitive but function names are not case sensitive.

Explanation:

  • If you defined variable in lowercase, then you need to use it in lowercase everywhere in program. If we define a variable $name = "James"; then we must need to use $name. $NAME will not work
  • If you defined function name in lowercase, but calling them in uppercase it will work. For example, If we define function sum() {} then calling SUM() will also work.
  • Note: Function names are case-insensitive, though it is usually good form to call functions in the same case as they appear in their declaration.