• PHP Video Tutorials

PHP - Function get_declared_classes()



Syntax

get_declared_classes ( void );

Definition and Usage

It returns an array of the names of the declared classes in the current script.

Parameters

Sr.No Parameter & Description
1

void

void means no parameter is required.

Return Value

It returns an array of the names of the declared classes in the current script.

Example

Following is the usage of this function −

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

It will produce the following result −

For view purpose the output is shorten.

Array (
   [0] => stdClass
   [1] => __PHP_Incomplete_Class
   [2] => Directory
   ...
   ...    	 
)
php_function_reference.htm
Advertisements