array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'function.spl-classes.php', 1 => 'spl_classes', ), 'up' => array ( 0 => 'ref.spl.php', 1 => 'SPL Functions', ), 'prev' => array ( 0 => 'function.spl-autoload.php', 1 => 'spl_autoload', ), 'next' => array ( 0 => 'function.spl-object-hash.php', 1 => 'spl_object_hash', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/spl/functions/spl-classes.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7, PHP 8)
spl_classes — Return available SPL classes
This function returns an array with the current available SPL classes.
This function has no parameters.
Returns an array containing the currently available SPL classes.
Example #1 spl_classes() example
<?php
print_r(spl_classes());
?>
The above example will output something similar to:
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 )