Skip to main content

Keywords

Keywords are reserved; they should not and usually cannot be used as names. Other words that shouldn't be used for names are the built-in types.

Keywords

abstract   as   async   attribute   await   break   case   catch   category   children
class classname clone const continue default do echo else enum eval
exit extends final finally for foreach function if implements include
include_once inout interface invariant isset list namespace new newtype
noreturn parent print private protected public require required
require_once return self shape super static switch throw trait try
tuple type unset use using where while yield

Deprecated Keywords

In addition, the following keywords are reserved for historical / future usage:

and   declare   die   elseif   empty   enddeclare   endfor   endforeach   endif
endswitch endwhile global goto instanceof insteadof or record var xor