get_class_vars

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Get the default properties of the class
<?php get_class_vars(string $class): array
<?php     {

        $class = $class ?: static::class;



        if (! get_class_vars($class)['timestamps'] || ! $class::UPDATED_AT) {

            return true;

        }
<?php         $properties = [];



        if (!isset(self::$defaultProperties[$c = static::class])) {

            self::$defaultProperties[$c] = get_class_vars($c);



            foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) {

                unset(self::$defaultProperties[$c][$k]);