Source Code Fundamentals: Keywords
关键词是区分大小写的保留字,不能用作变量名等。
abstract arraykey as async await break case catch class classname clone const continue default do
dynamic echo else elseif enum extends final finally for foreach function if implements inout
instanceof insteadof interface mixed namespace new newtype noreturn num parent private
protected public require require_once return self shape static switch throw trait try
tuple type use while yield
严格来说,false
、nonnull
、null
和 true
不是关键词,但是它们确实具有预定义的含义,可以视为关键词。此外,对于内置函数的名称(例如echo
和invariant
)也是同样的道理。
本节由 Y!an 翻译