略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: spl_classes

2024-12-21

spl_classes

(PHP 5, PHP 7, PHP 8)

spl_classes返回所有可用的SPL类

说明

spl_classes(): array

本函数返回当前所有可用的 SPL 类的数组。

参数

此函数没有参数。

返回值

Returns an array containing the currently available SPL classes.

范例

示例 #1 spl_classes() example

<?php

print_r
(spl_classes());

?>

以上例程的输出类似于:

Array
(
    [ArrayObject] => ArrayObject
    [ArrayIterator] => ArrayIterator
    [CachingIterator] => CachingIterator
    [RecursiveCachingIterator] => RecursiveCachingIterator
    [DirectoryIterator] => DirectoryIterator
    [FilterIterator] => FilterIterator
    [LimitIterator] => LimitIterator
    [ParentIterator] => ParentIterator
    [RecursiveDirectoryIterator] => RecursiveDirectoryIterator
    [RecursiveIterator] => RecursiveIterator
    [RecursiveIteratorIterator] => RecursiveIteratorIterator
    [SeekableIterator] => SeekableIterator
    [SimpleXMLIterator] => SimpleXMLIterator
)
add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/function.spl-classes.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3