# [RFC] [Vote] Final constants

- Thread: https://externals.io/message/114522
- Original archive: https://news-web.php.net/php.internals/114522
- Started by kocsismate90@gmail.com on 2021-05-19T08:02:41+00:00
- Messages: 4
- RFC: Final class constants (Implemented (PHP 8.1)) — https://externals.io/rfc/final_class_const.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #114522 — kocsismate90@gmail.com — 2021-05-19T08:02:41+00:00

URL: https://externals.io/message/114522#114522

Hi Internals,

2 weeks of discussion period has passed, so I'm opening the vote. RFC link:
https://wiki.php.net/rfc/final_class_const, previous threads:
https://externals.io/message/114066, https://externals.io/message/114273

The vote will be closed on 2021-06-02.

Regards:
Máté

---

## #114562 — G. P. B. — 2021-05-23T23:42:34+00:00

URL: https://externals.io/message/114522#114562 · In reply to: #114522

> Hi Internals,
>
> 2 weeks of discussion period has passed, so I'm opening the vote. RFC link:
> https://wiki.php.net/rfc/final_class_const, previous threads:
> https://externals.io/message/114066, https://externals.io/message/114273
>
> The vote will be closed on 2021-06-02.
>
> Regards:
> Máté
>


I'm voting against this because it makes interface constants overridable by
default.
And this means now an interface which extends another one can override the
value of it, something which is currently not possible:
https://3v4l.org/l4OOB

The current behaviour for classes might be unfortunate but can make sense.
If this would only target class constants my vote would probably be
different.

Best regards,

George P. Banyard

---

## #114563 — kocsismate90@gmail.com — 2021-05-24T08:14:35+00:00

URL: https://externals.io/message/114522#114563 · In reply to: #114562

Hi George,

Being able to override interface constants by default might seem like a
regression, but I believe making interface constant behavior consistent with
class constants is worth this, and also, I don't see any other good way to
fix the weird inheritance behavior Nikita highlighted than to do what the
RFC
currently proposes.

Regards:
Máté

---

## #114690 — kocsismate90@gmail.com — 2021-06-02T08:05:37+00:00

URL: https://externals.io/message/114522#114690 · In reply to: #114563

Hi Internals,

I've just closed the vote, and the RFC is accepted with 28 votes in favor
and 4 against.

Regards:
Máté

Máté Kocsis <kocsismate90@gmail.com> ezt írta (időpont: 2021. máj. 24., H,
10:14):

> Hi George,
>
> Being able to override interface constants by default might seem like a
> regression, but I believe making interface constant behavior consistent with
> class constants is worth this, and also, I don't see any other good way to
> fix the weird inheritance behavior Nikita highlighted than to do what the
> RFC
> currently proposes.
>
> Regards:
> Máté
