1. Go to this page and download the library: Download oblak/syllabizer 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/ */
oblak / syllabizer example snippets
blak\Syllabizer;
$syllabizer = new Syllabizer();
$syllabizer->syllabize('jednak'); // ['jed', 'nak']
$syllabizer->syllabize('tramvaj'); // ['tram', 'vaj']
$syllabizer->syllabize('pidžama'); // ['pi', 'dža', 'ma']
$syllabizer->syllabize('mačka'); // ['ma', 'čka']
// Cyrillic works just as well
$syllabizer->syllabize('сломљен'); // ['слом', 'љен']
// Syllabic R (slogotvorno r) is a nucleus of its own
$syllabizer->syllabize('brzo'); // ['br', 'zo']
$syllabizer->syllabize('rđa'); // ['r', 'đa']
// Count the syllables
count($syllabizer->syllabize('slogovnik')); // 3