預(yù)定義類(lèi)

本節(jié)列出標(biāo)準(zhǔn)的預(yù)定義類(lèi)。各種擴(kuò)展庫(kù)定義了其它類(lèi),其說(shuō)明在各自的參考文檔中。

標(biāo)準(zhǔn)類(lèi)

這些類(lèi)由一些內(nèi)建在 PHP 中的標(biāo)準(zhǔn)函數(shù)定義。

Directory
dir() 創(chuàng)建。
stdClass
Created by typecasting to object.
__PHP_Incomplete_Class
Possibly created by unserialize().
Exception
ErrorException
php_user_filter
Closure
預(yù)定義的 final 類(lèi) Closure,它可以用于實(shí)現(xiàn) 匿名函數(shù)。
Generator
預(yù)定義的 final 類(lèi) Generator,它可以用于實(shí)現(xiàn) generators。
ArithmeticError
AssertionError
DivisionByZeroError
Error
Throwable
ParseError
TypeError

特殊的類(lèi)

以下這些標(biāo)識(shí)符由于它們有特殊的用處,因此不可作為類(lèi)名

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