mirror of
https://github.com/php/php-src.git
synced 2024-11-26 19:33:55 +08:00
269c8dac1d
RFC: https://wiki.php.net/rfc/enumerations Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Closes GH-6489.
16 lines
273 B
PHP
16 lines
273 B
PHP
<?php
|
|
|
|
/** @generate-class-entries */
|
|
|
|
interface UnitEnum
|
|
{
|
|
public static function cases(): array;
|
|
}
|
|
|
|
interface BackedEnum extends UnitEnum
|
|
{
|
|
public static function from(int|string $value): static;
|
|
|
|
public static function tryFrom(int|string $value): ?static;
|
|
}
|