List of other reserved words
The following words cannot be used to name a class, interface, trait or enum.
Prior to PHP 8.0, they are also prohibited from being used in namespaces.
Reserved words
|
parent
|
self
|
int
|
float
|
|
bool
|
string
|
true
|
false
|
|
null
|
void (as of PHP 7.1)
|
iterable (as of PHP 7.1)
|
object (as of PHP 7.2)
|
|
mixed (as of PHP 8.0)
|
never (as of PHP 8.1)
|
array (as of PHP 8.5)
|
callable (as of PHP 8.5)
|
The following list of words have had soft reservations placed on them.
Whilst they may still be used as class, interface, trait and enum names,
usage of them is highly discouraged since they may be
used in future versions of PHP.
Soft reserved words
|
enum
|
resource
|
numeric
|
|