PHP 8.1.28 Released!

ReflectionExtension::getClassNames

(PHP 5, PHP 7, PHP 8)

ReflectionExtension::getClassNames获取类名列表

说明

public ReflectionExtension::getClassNames(): array

获取扩展中的类名列表。

参数

此函数没有参数。

返回值

扩展中定义的类名 array。如果扩展中没有定义类,将返回空数组。

示例

示例 #1 ReflectionExtension::getClassNames() 示例

<?php
$ext
= new ReflectionExtension('XMLWriter');
var_dump($ext->getClassNames());
?>

以上示例的输出类似于:

array(1) {
  [0]=>
  string(9) "XMLWriter"
}

参见

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top