# Deprecate mhash constants?

- Thread: https://externals.io/message/125864
- Original archive: https://news-web.php.net/php.internals/125864
- Started by Christoph M. Becker on 2024-10-25T17:24:51+00:00
- Messages: 3
- RFC: Deprecations for PHP 8.1 (Implemented (PHP 8.1)) — https://externals.io/rfc/deprecations_php_8_1.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

---

## #125864 — Christoph M. Becker — 2024-10-25T17:24:51+00:00

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

Hi all,

recently, it was discovered that although the mhash functions are
deprecated as of PHP 8.1.0[1], the mhash constants are not yet
deprecated.  I believe that was just an oversight, since the are well
hidden in the sources, and we don't even have them in the stub files[2].

I made a PR to actually deprecate the constants[3].  Does anybody feel
this needs the RFC process?

[1] <https://wiki.php.net/rfc/deprecations_php_8_1#mhash_function_family>
[2] <https://github.com/php/doc-en/issues/3902>
[3] <https://github.com/php/php-src/pull/16569>

Christoph

---

## #125865 — Kamil Tekiela — 2024-10-25T17:30:58+00:00

URL: https://externals.io/message/125864#125865 · In reply to: #125864

They should have been deprecated back then. No RFC needed.

---

## #125866 — Niels Dossche — 2024-10-25T19:32:39+00:00

URL: https://externals.io/message/125864#125866 · In reply to: #125864

> Hi all,
> 
> recently, it was discovered that although the mhash functions are
> deprecated as of PHP 8.1.0[1], the mhash constants are not yet
> deprecated.  I believe that was just an oversight, since the are well
> hidden in the sources, and we don't even have them in the stub files[2].
> 
> I made a PR to actually deprecate the constants[3].  Does anybody feel
> this needs the RFC process?
> 
> [1] <https://wiki.php.net/rfc/deprecations_php_8_1#mhash_function_family>
> [2] <https://github.com/php/doc-en/issues/3902>
> [3] <https://github.com/php/php-src/pull/16569>
> 
> Christoph

Since their intended use is deprecated, just deprecate them already too :)

Kind regards
Niels
