Predefined Classes

This section lists standard predefined classes. Miscellaneous extensions define other classes which are described in their reference.

Standard Defined Classes

These classes are defined in the standard set of functions included in the PHP build.

Directory
Created by dir().
stdClass
A generic empty class created as a result of typecasting to object or various standard functions.
__PHP_Incomplete_Class
Possibly created by unserialize().
Exception
ErrorException
php_user_filter
Closure
The predefined final class Closure is used for representing anonymous functions.
Generator
The predefined final class Generator is used for representing generators.
ArithmeticError
AssertionError
DivisionByZeroError
Error
Throwable
ParseError
TypeError

Special classes

Following identifiers may not be used as a class name as they have special purpose.

self
Current class.
static
Current class in runtime.
parent
Parent class.