Hi Am 2025-02-07 16:03, schrieb Marc Bennewitz:
Is that something feasible and how complicated would that be to implement?
Supporting this might cause conflicts when full-blown tagged-unions are proposed, because those would actually support properties and semantics might need to be different than those a naive “rushed” implementation of property hooks for enums would propose.
See https://wiki.php.net/rfc/tagged_unions for an very early draft (which is not in a shape to be discussed further).
Best regards Tim Düsterhus