Difference between revisions of "PHP/native/UnitEnum"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< PHP
Jump to navigation Jump to search
(Created page with "{{fmt/title|UnitEnum interface}} * '''manual page''': [https://www.php.net/manual/en/class.unitenum.php The UnitEnum interface] ==Definition== <syntaxhighlight lang=php> inter...")
 
Line 1: Line 1:
{{fmt/title|UnitEnum interface}}
+
{{fmt/title|UnitEnum pseudointerface}}
 
* '''manual page''': [https://www.php.net/manual/en/class.unitenum.php The UnitEnum interface]
 
* '''manual page''': [https://www.php.net/manual/en/class.unitenum.php The UnitEnum interface]
 +
 +
Note that this cannot actually be implemented as a class, except by declaring a backed enum.
 
==Definition==
 
==Definition==
 
<syntaxhighlight lang=php>
 
<syntaxhighlight lang=php>

Revision as of 20:09, 23 August 2024

UnitEnum pseudointerface

Note that this cannot actually be implemented as a class, except by declaring a backed enum.

Definition

interface UnitEnum {
  static cases(): array
  string $name; // unofficial
}