PHP 所有内置对象的参考?

发布于 2024-10-29 09:28:08 字数 102 浏览 2 评论 0原文

我搜索了 Stackoverflow 和 Google,似乎找不到列出所有 PHP 内置对象(例如 DateTime)的参考(详尽的或其他的)。有没有人有这种性质的链接,我将不胜感激,谢谢。

I have searched Stackoverflow and Google and can't seem to find a reference (exhaustive or otherwise) that lists all of PHP's built-in objects such as DateTime. Does anyone have any links to something of this nature, I would appreciate it, thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

绝情姑娘 2024-11-05 09:28:08

您可以使用 get_declared_classes()。根据您拥有的扩展数量,可能的输出可能是:

Array
(
    [0] => stdClass
    [1] => Exception
    [2] => ErrorException
    [3] => DateTime
    [4] => DateTimeZone
    [5] => ReflectionException
    [6] => Reflection
    [7] => ReflectionFunctionAbstract
    [8] => ReflectionFunction
    [9] => ReflectionParameter
    [10] => ReflectionMethod
    [11] => ReflectionClass
    [12] => ReflectionObject
    [13] => ReflectionProperty
    [14] => ReflectionExtension
    [15] => RecursiveIteratorIterator
    [16] => IteratorIterator
    [17] => FilterIterator
    [18] => RecursiveFilterIterator
    [19] => ParentIterator
    [20] => LimitIterator
    [21] => CachingIterator
    [22] => RecursiveCachingIterator
    [23] => NoRewindIterator
    [24] => AppendIterator
    [25] => InfiniteIterator
    [26] => RegexIterator
    [27] => RecursiveRegexIterator
    [28] => EmptyIterator
    [29] => ArrayObject
    [30] => ArrayIterator
    [31] => RecursiveArrayIterator
    [32] => SplFileInfo
    [33] => DirectoryIterator
    [34] => RecursiveDirectoryIterator
    [35] => SplFileObject
    [36] => SplTempFileObject
    [37] => LogicException
    [38] => BadFunctionCallException
    [39] => BadMethodCallException
    [40] => DomainException
    [41] => InvalidArgumentException
    [42] => LengthException
    [43] => OutOfRangeException
    [44] => RuntimeException
    [45] => OutOfBoundsException
    [46] => OverflowException
    [47] => RangeException
    [48] => UnderflowException
    [49] => UnexpectedValueException
    [50] => SplObjectStorage
    [51] => __PHP_Incomplete_Class
    [52] => php_user_filter
    [53] => Directory
)

You can use get_declared_classes(). Depending on how many extensions you have, a possible output could be:

Array
(
    [0] => stdClass
    [1] => Exception
    [2] => ErrorException
    [3] => DateTime
    [4] => DateTimeZone
    [5] => ReflectionException
    [6] => Reflection
    [7] => ReflectionFunctionAbstract
    [8] => ReflectionFunction
    [9] => ReflectionParameter
    [10] => ReflectionMethod
    [11] => ReflectionClass
    [12] => ReflectionObject
    [13] => ReflectionProperty
    [14] => ReflectionExtension
    [15] => RecursiveIteratorIterator
    [16] => IteratorIterator
    [17] => FilterIterator
    [18] => RecursiveFilterIterator
    [19] => ParentIterator
    [20] => LimitIterator
    [21] => CachingIterator
    [22] => RecursiveCachingIterator
    [23] => NoRewindIterator
    [24] => AppendIterator
    [25] => InfiniteIterator
    [26] => RegexIterator
    [27] => RecursiveRegexIterator
    [28] => EmptyIterator
    [29] => ArrayObject
    [30] => ArrayIterator
    [31] => RecursiveArrayIterator
    [32] => SplFileInfo
    [33] => DirectoryIterator
    [34] => RecursiveDirectoryIterator
    [35] => SplFileObject
    [36] => SplTempFileObject
    [37] => LogicException
    [38] => BadFunctionCallException
    [39] => BadMethodCallException
    [40] => DomainException
    [41] => InvalidArgumentException
    [42] => LengthException
    [43] => OutOfRangeException
    [44] => RuntimeException
    [45] => OutOfBoundsException
    [46] => OverflowException
    [47] => RangeException
    [48] => UnderflowException
    [49] => UnexpectedValueException
    [50] => SplObjectStorage
    [51] => __PHP_Incomplete_Class
    [52] => php_user_filter
    [53] => Directory
)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文