In PHP, ezmlm_hash() calculated the hash value that EZMLM mailing list software expects for an email address.
It was deprecated in PHP 7.2 and removed in PHP 8.0. Most beginners should learn mail() instead. If you still maintain EZMLM files on PHP 8, copy a small userland helper that uses the same algorithm.
Syntax
Call ezmlm_hash() with the values you need. Start with this line.
PHP
// Removed in PHP 8.0 — use a userland helper instead
$hash = ezmlm_hash_compat('[email protected]');
Userland replacement that returns the same style of EZMLM hash integer.
ezmlm_hash_compat(strtolower($email))
Lowercasing first matches how the old function treated letters.
(string) ezmlm_hash_compat($email)
Cast the hash to a string when you need it as a folder name.
Do not call ezmlm_hash() on PHP 8 — it no longer exists. The examples on this page use ezmlm_hash_compat(), a short replacement you can paste into your project.
Library declarations
PHP
ezmlm_hash(string $addr): int
Parameters
Parameter
Description
addr
Required. Historical: the email address to hash, for example [email protected].
Return Value
Return Value
Description
int
Historical: the EZMLM hash for that address (0–52). Use it as the subscriber directory name EZMLM expects.
PHP Examples
Example 1 — Userland Replacement Hash
Paste a compatible helper and hash a fixed address. This works on PHP 8.
It returned the integer hash that EZMLM mailing list software uses for an email address when storing subscriber files.
The function was removed in PHP 8.0. Use a userland replacement such as ezmlm_hash_compat() if you still need the hash, or ignore it if you only send mail with mail().
No. It only calculated a number. Use mail() when you want PHP to hand a message to the server mailer.
Only when you work with EZMLM subscriber directories. Most PHP apps never need it.
Learn mail() for sending messages, how headers work, and how to avoid header injection.