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