The following words cannot be used to name a class, interface or trait, and they are also prohibited from being used in namespaces.
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) |
The following list of words have had soft reservations placed on them. Whilst they may still be used as class, interface, and trait names (as well as in namespaces), usage of them is highly discouraged since they may be used in future versions of PHP.
resource | mixed | numeric |