PHP Reserved Words

This is a quick reference list of PHP key words.  These words all have separate meanings in PHP and thus can not be used for constants, class names, functions, or methods.  You could use these as variables, but for obvious reasons, this could lead to problems and is not recommended.

This list combines keywords, functions, classes, and language constructs into a single alphabetical list you can scan quickly to determine if the name you want to use is on the list and thus should not be used.

abstract
and
array
as
break
case
catch
class
clone
const
continue
declare
default
do
die
echo
else
elseif
empty
enddeclare
endfor
endforeach
endif
endswitch
endwhile
eval
exit
extends
final
for
foreach
function
global
goto
if
implements
include
include_once
interface
isset
instanceof
list
namespace
new
or
parent
print
private
protected
public
require
require_once
return
self
static
switch
throw
try
unset
use
var
while
xor

Comments are closed.