This function determines whether the provided value is an enumeration type member or not.
This function does not generate a change.
is_enum(value)
Argument | Type | Description |
---|---|---|
value | any (required) | The value to be tested. |
Returns true
if the given value is of type enum
, else it returns false
.
This code shows some return values for is_enum():
set_enum('Status', {
OK: 0,
NOK: -1,
});
[
is_enum( Status{OK} ),
is_enum( 0 ),
];
Return value in JSON format
[
true,
false
]