date: 2017-07-27
PHP的命名空间是否区分大小写?
结论:不区分大小写,与类名一样(不区分大小写)。
不区分大小写的包括
- 函数名
- 方法名
- 类名
- 控制语句(if, else, for, while, foreach)
- null,true, false
- 魔术变量
- 变量强制类型转换(int, string, double, boolean, object, array)
- 语言结构(echo, require, include)
相关阅读
- it is usually good form to call functions as they appear in their declaration.
- always use same cases when reference back to either variables(its' mandatory) or functions(its' optional, but recommended).
case sensitive
variables, constants, array keys, class properties, class constants
notice: array keys
Array
(
[a] => bb
[A] => CC
)
case insensitive
functions, class constructors, class methods, keywords and constructs (if, else, null, foreach, echo etc.)