Tutorials Point


  Learning PHP
  Advanced PHP
  PHP Function Reference
  PHP Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

PHP Function get_declared_classes()


previous

Advertisements

Syntax

get_declared_classes ( void );

Definition and Usage

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

Paramters

ParameterDescription
voidvoid means no parameter is required.

Return Value

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 following result:

Array
(
    [0] => stdClass
    [1] => __PHP_Incomplete_Class
    [2] => Directory
)

previous Printer Friendly

Advertisements


  

Advertisements