預定義類

本節(jié)列出標準的預定義類。各種擴展庫定義了其它類,其說明在各自的參考文檔中。

標準類

這些類由一些內建在 PHP 中的標準函數定義。

Directory
dir() 創(chuàng)建。
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.