预定义类

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

标准类

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

Directory

dir 中用来实例化的类。

stdClass

__PHP_Incomplete_Class

自 PHP 5 起预定义的类

这些额外的预定义类是 PHP 5.0.0 引进的。

exception

php_user_filter


add a note add a note User Contributed Notes
Simon Kissane
14-Sep-2004 03:54
The above list is incomplete. For example, on my PHP 5.0 configuration (yours may differ depending on the extensions you choose to install), the following classes are predefined:

== "Core" ==
stdClass
Exception
__PHP_Incomplete_Class
php_user_filter
Directory

== Reflection API ==
ReflectionException
Reflection
ReflectionFunction
ReflectionParameter
ReflectionMethod
ReflectionClass
ReflectionObject
ReflectionProperty
ReflectionExtension

== SQLLite ==
SQLiteDatabase
SQLiteResult
SQLiteUnbuffered
SQLiteException

== Standard PHP Lib. ==
RecursiveIteratorIterator
FilterIterator
ParentIterator
LimitIterator
CachingIterator
CachingRecursiveIterator
ArrayObject
ArrayIterator
DirectoryIterator
RecursiveDirectoryIterator

== SimpleXML ==
SimpleXMLElement
SimpleXMLIterator

== DOM/XSL/XPath extensions ==
DOMException
DOMStringList
DOMNameList
DOMImplementationList
DOMImplementationSource
DOMImplementation
DOMNode
DOMNameSpaceNode
DOMDocumentFragment
DOMDocument
DOMNodeList
DOMNamedNodeMap
DOMCharacterData
DOMAttr
DOMElement
DOMText
DOMComment
DOMTypeinfo
DOMUserDataHandler
DOMDomError
DOMErrorHandler
DOMLocator
DOMConfiguration
DOMCdataSection
DOMDocumentType
DOMNotation
DOMEntity
DOMEntityReference
DOMProcessingInstruction
DOMStringExtend
DOMXPath
XSLTProcessor
unknown
24-Jul-2002 01:29
It's handy to have a array of the reserved classes.....
var_dump (get_declared_classes ());