metaphone() Is Deprecated
metaphone() computes a phonetic key for an ASCII string. In PHP 8.6, calling it emits a deprecation notice recommending a userland phonetic matching library instead; the function still returns the same key as before.
PHP code
<?php
var_dump(metaphone("Thompson"));
?>
Before
string(5) "0MPSN"
After
PHP Deprecated: Function metaphone() is deprecated since 8.6, use a userland phonetic matching library instead in /codes/metaphoneDeprecated86.php on line 3
Deprecated: Function metaphone() is deprecated since 8.6, use a userland phonetic matching library instead in /codes/metaphoneDeprecated86.php on line 3
string(5) "0MPSN"
PHP version change
This behavior was deprecated in 8.6.
This behavior changed in .