[go: nahoru, domu]

CascadiaPHP 2024

Voting

: two minus zero?
(Example: nine)

The Note You're Voting On

Ulf
9 months ago
Note, that enums are internally declared as final and thus, cannot extend each other (though, they are allowed to extend other classes).

That also means, that the "Size::fromLength()" method from this page's example redundantly uses "static::" (because there's no late static binding required), and could easily use "self::" or "Size::" instead.

See: https://php.watch/versions/8.1/enums#enum-inheritance

<< Back to user notes page

To Top