PHP Conference Nagoya 2025

ReflectionExtension::getClassNames

(PHP 5, PHP 7, PHP 8)

ReflectionExtension::getClassNamesGets class names

Description

public ReflectionExtension::getClassNames(): array

Gets a listing of class names as defined in the extension.

Parameters

This function has no parameters.

Return Values

An array of class names, as defined in the extension. If no classes are defined, an empty array is returned.

Examples

Example #1 ReflectionExtension::getClassNames() example

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

The above example will output something similar to:

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

See Also

add a note

User Contributed Notes

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