enum_exists

PHP 8 >= 8.1.0
enum_exists - Checks if the enum has been defined
Manual
Code Examples

enum_exists( string$enum, [bool$autoload = true] ): bool

This function checks whether or not the given enum has been defined.

Parameters

enum

The enum name. The name is matched in a case-insensitive manner.

autoload

Whether to call __autoload by default.

Return Values

Returns true if enum is a defined enum, false otherwise.

Related Functions

Example of enum_exists

Show all examples for enum_exists

PHP Version:


Function enum_exists:

Class/Object Information Functions

Most used PHP functions