PHP Tutorial - PHP get_declared_classes() function






get_declared_classes() returns an array of all classes of which you can currently create an object.

Syntax

array get_declared_classes ( void )

Return Values

Returns an array of the names of the declared classes in the current script.

Example

Get the declared classes


<?php
print_r(get_declared_classes());
?>

The code above generates the following result.