get_declared_classes

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Returns an array with the name of the defined classes
<?php get_declared_classes(): array
<?php     public function __construct()

    {

        if (empty(self::$declaredClasses)) {

            self::$declaredClasses = get_declared_classes();

        }

    }
<?php         $loadedClasses = array_values(

            array_diff(

                get_declared_classes(),

                array_merge(

                    self::$declaredClasses,

                    self::$loadedClasses
<?php         if (null === self::$vendorRoots) {

            self::$vendorRoots = [];



            foreach (get_declared_classes() as $class) {

                if ('C' === $class[0] && str_starts_with($class, 'ComposerAutoloaderInit')) {

                    $r = new \ReflectionClass($class);

                    $v = \dirname($r->getFileName(), 2);