PHP/native/UnitEnum: Difference between revisions

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< PHP
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..."
 
No edit summary
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

{{#set: page title=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
}