Supported Versions: PHP 8 >= 8.1.0
Checks if the enum has been defined
<?php enum_exists(string $enum, bool $autoload = true): bool
<?php             return false;

        }



        return enum_exists($castType);

    }
<?php     public function enum($key, $enumClass)

    {

        if ($this->isNotFilled($key) ||

            ! enum_exists($enumClass) ||

            ! method_exists($enumClass, 'tryFrom')) {

            return null;

        }
<?php             return false;

        }



        if (enum_exists($backedEnumClass)) {

            $reflectionBackedEnum = new ReflectionEnum($backedEnumClass);



            return $reflectionBackedEnum->isBacked()
<?php             return $this->isDesirable($value);

        }



        if (is_null($value) || ! enum_exists($this->type) || ! method_exists($this->type, 'tryFrom')) {

            return false;

        }