(PHP 5, PHP 7, PHP 8)
spl_classes — 返回可用的 SPL 类
此函数没有参数。
返回一个 array,包含当前可用的 SPL 类。
示例 #1 spl_classes() 示例
<?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 )