预定义类

本节列出标准的预定义类。各种扩展库定义了其它类,其说明在各自的参考文档中。

标准类

这些类由一些内建在 PHP 中的标准函数定义。

Directory
dir() 创建。
stdClass
Created by typecasting to object.
__PHP_Incomplete_Class
Possibly created by unserialize().
Exception
ErrorException
php_user_filter
Closure
预定义的 final 类 Closure,它可以用于实现 匿名函数
Generator
预定义的 final 类 Generator,它可以用于实现 generators
ArithmeticError
AssertionError
DivisionByZeroError
Error
Throwable
ParseError
TypeError

特殊的类

以下这些标识符由于它们有特殊的用处,因此不可作为类名

self
Current class.
static
Current class in runtime.
parent
Parent class.
7i24.Com