Home Menu

get_declared_classes

Returns an array with the name of the defined classes

Syntax

get_declared_classes ( void ) : array

Return

Returns an array of the names of the declared classes in the current script.

Note: Note that depending on what extensions you have compiled or loaded into PHP, additional classes could be present. This means that you will not be able to define your own classes using these names. There is a list of predefined classes in the Predefined Classes section of the appendices.

Examples

<?

$return = get_declared_classes();

print_r($return);

?>
Array
(
    [0] => stdClass
    [1] => InternalIterator
    [2] => Exception
    [3] => ErrorException
    [4] => Error
    [5] => CompileError
    [6] => ParseError
    [7] => TypeError
    [8] => ArgumentCountError
    [9] => ValueError
    [10] => ArithmeticError
    [11] => DivisionByZeroError
    [12] => UnhandledMatchError
    [13] => Closure
    [14] => Generator
    [15] => ClosedGeneratorException
    [16] => WeakReference
    [17] => WeakMap
    [18] => Attribute
    [19] => DateTime
    [20] => DateTimeImmutable
    [21] => DateTimeZone
    [22] => DateInterval
    [23] => DatePeriod
    [24] => LibXMLError
    [25] => OpenSSLCertificate
    [26] => OpenSSLCertificateSigningRequest
    [27] => OpenSSLAsymmetricKey
    [28] => SQLite3
    [29] => SQLite3Stmt
    [30] => SQLite3Result
    [31] => InflateContext
    [32] => DeflateContext
    [33] => CurlHandle
    [34] => CurlMultiHandle
    [35] => CurlShareHandle
    [36] => CURLFile
    [37] => HashContext
    [38] => GMP
    [39] => LogicException
    [40] => BadFunctionCallException
    [41] => BadMethodCallException
    [42] => DomainException
    [43] => InvalidArgumentException
    [44] => LengthException
    [45] => OutOfRangeException
    [46] => RuntimeException
    [47] => OutOfBoundsException
    [48] => OverflowException
    [49] => RangeException
    [50] => UnderflowException
    [51] => UnexpectedValueException
    [52] => RecursiveIteratorIterator
    [53] => IteratorIterator
    [54] => FilterIterator
    [55] => RecursiveFilterIterator
    [56] => CallbackFilterIterator
    [57] => RecursiveCallbackFilterIterator
    [58] => ParentIterator
    [59] => LimitIterator
    [60] => CachingIterator
    [61] => RecursiveCachingIterator
    [62] => NoRewindIterator
    [63] => AppendIterator
    [64] => InfiniteIterator
    [65] => RegexIterator
    [66] => RecursiveRegexIterator
    [67] => EmptyIterator
    [68] => RecursiveTreeIterator
    [69] => ArrayObject
    [70] => ArrayIterator
    [71] => RecursiveArrayIterator
    [72] => SplFileInfo
    [73] => DirectoryIterator
    [74] => FilesystemIterator
    [75] => RecursiveDirectoryIterator
    [76] => GlobIterator
    [77] => SplFileObject
    [78] => SplTempFileObject
    [79] => SplDoublyLinkedList
    [80] => SplQueue
    [81] => SplStack
    [82] => SplHeap
    [83] => SplMinHeap
    [84] => SplMaxHeap
    [85] => SplPriorityQueue
    [86] => SplFixedArray
    [87] => SplObjectStorage
    [88] => MultipleIterator
    [89] => JsonException
    [90] => ReflectionException
    [91] => Reflection
    [92] => ReflectionFunctionAbstract
    [93] => ReflectionFunction
    [94] => ReflectionGenerator
    [95] => ReflectionParameter
    [96] => ReflectionType
    [97] => ReflectionNamedType
    [98] => ReflectionUnionType
    [99] => ReflectionMethod
    [100] => ReflectionClass
    [101] => ReflectionObject
    [102] => ReflectionProperty
    [103] => ReflectionClassConstant
    [104] => ReflectionExtension
    [105] => ReflectionZendExtension
    [106] => ReflectionReference
    [107] => ReflectionAttribute
    [108] => SessionHandler
    [109] => __PHP_Incomplete_Class
    [110] => php_user_filter
    [111] => Directory
    [112] => AssertionError
    [113] => Shmop
    [114] => SimpleXMLElement
    [115] => SimpleXMLIterator
    [116] => PhpToken
    [117] => XMLParser
    [118] => DOMException
    [119] => DOMImplementation
    [120] => DOMNode
    [121] => DOMNameSpaceNode
    [122] => DOMDocumentFragment
    [123] => DOMDocument
    [124] => DOMNodeList
    [125] => DOMNamedNodeMap
    [126] => DOMCharacterData
    [127] => DOMAttr
    [128] => DOMElement
    [129] => DOMText
    [130] => DOMComment
    [131] => DOMCdataSection
    [132] => DOMDocumentType
    [133] => DOMNotation
    [134] => DOMEntity
    [135] => DOMEntityReference
    [136] => DOMProcessingInstruction
    [137] => DOMXPath
    [138] => finfo
    [139] => GdImage
    [140] => ImagickException
    [141] => ImagickDrawException
    [142] => ImagickPixelIteratorException
    [143] => ImagickPixelException
    [144] => ImagickKernelException
    [145] => Imagick
    [146] => ImagickDraw
    [147] => ImagickPixelIterator
    [148] => ImagickPixel
    [149] => ImagickKernel
    [150] => Collator
    [151] => NumberFormatter
    [152] => Normalizer
    [153] => Locale
    [154] => MessageFormatter
    [155] => IntlDateFormatter
    [156] => ResourceBundle
    [157] => Transliterator
    [158] => IntlTimeZone
    [159] => IntlCalendar
    [160] => IntlGregorianCalendar
    [161] => Spoofchecker
    [162] => IntlException
    [163] => IntlIterator
    [164] => IntlBreakIterator
    [165] => IntlRuleBasedBreakIterator
    [166] => IntlCodePointBreakIterator
    [167] => IntlPartsIterator
    [168] => UConverter
    [169] => IntlChar
    [170] => mysqli_sql_exception
    [171] => mysqli_driver
    [172] => mysqli
    [173] => mysqli_warning
    [174] => mysqli_result
    [175] => mysqli_stmt
    [176] => PDOException
    [177] => PDO
    [178] => PDOStatement
    [179] => PDORow
    [180] => PharException
    [181] => Phar
    [182] => PharData
    [183] => PharFileInfo
    [184] => SoapClient
    [185] => SoapVar
    [186] => SoapServer
    [187] => SoapFault
    [188] => SoapParam
    [189] => SoapHeader
    [190] => XMLReader
    [191] => XMLWriter
    [192] => ZipArchive
)

PHP

JesusBible
HTMLCSSJSPHPSVGMore
AboutTerms