1. Go to this page and download the library: Download voku/phonetic-algorithms library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
voku / phonetic-algorithms example snippets
(new Phonetic('es'))->phonetic_word('vaca'); // 'BAKA'
(new Phonetic('es'))->phonetic_word('baca'); // 'BAKA' - "b" and "v" are one sound
(new Phonetic('nl'))->phonetic_word('Meijer'); // 'MYER'
(new Phonetic('nl'))->phonetic_word('Meyer'); // 'MYER' - "ij", "ei" and "y" are one sound
(new Phonetic('pl'))->phonetic_word('Wałęsa'); // 'VALESA'
(new Phonetic('pl'))->phonetic_word('Walesa'); // 'VALESA' - a query without diacritics still matches
use voku\helper\Phonetic;
$words = array(
'Moelleken',
'Mölleken',
'Möleken',
'Moeleken',
'Moellecken',
'Möllecken',
'Mölecken',
);
$phonetic = new Phonetic('de');
foreach ($words as $word) {
$phonetic->phonetic_word($string); // '6546'
}