List of Keywords in php

A keyword (or reserved word) is a word set aside by the language for its core functionality—you cannot give a variable, function, class, or constant the same name as a keyword

Table to Lists the keywords in PHP, which are case-insensitive

_CLASS_echoinsteadof
_DIR_elseinterface
_FILE_elseifisset()
_FUNCTION_empty()list()
_LINE_enddeclarenamespace
_METHOD_endfornew
_NAMESPACE_endforeachor
_TRAIT_endifprint
_halt_compiler()endswitchprivate
abstractendwhileprotected
andeval()public
array()exit()require
asextendsrequire_once
breakfinalreturn
callableforstatic
caseforeachswitch
catchfunctionthrow
classglobaltrait
clonegototry
constifunset()
continueimplementsuse
declareincludevar
defaultinclude_oncewhile
die()instanceofxor
do
PHP core language keywords

Leave a Comment