The metaphone() function turns a word into a short key based on how it sounds in English, so two words that sound alike get the same key. This RFC from Weilin Du proposed deprecating it in PHP 8.6, which means PHP would warn you when you call it ahead of removing it later.

Why change it

The Metaphone algorithm dates from 1990 and only follows English pronunciation rules. Improved versions followed, with Double Metaphone in 1999 and Metaphone 3 in 2009, yet PHP's core still ships the original, written in C.

The RFC argues that phonetic matching rules belong in installable libraries rather than in PHP itself, because they're tied to a single language and change over time. Composer packages already offer Double Metaphone and Metaphone 3, and the RFC names three of them.

It also mentions soundex(), which does a similar job, but leaves it alone. Many databases implement soundex too, so removing it could break more code.

What it would look like

Calling the function would still work, but it would emit a deprecation notice:

$key = metaphone('hello world');
// Deprecated: Function metaphone() is deprecated since PHP 8.6

What it means for existing code

Nothing, since the RFC was withdrawn. Had it passed, any code calling metaphone() would have seen E_DEPRECATED notices. The RFC suggested moving to a userland library, or using soundex() for anyone who wanted to stick with a core function.

Where it stands

The author withdrew the RFC. The vote on the page never opened, and no votes were cast.