1. Go to this page and download the library: Download aleksender/yii2-morphy 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/ */
aleksender / yii2-morphy example snippets
$morphy = new \aleksender\morphy\PhpMorphy();
$word = "КОТ";
if ($paradigms = $morphy->findWord($word)) {
foreach ($paradigms as $paradigm) {
foreach ($paradigm as $form) {
echo $form->getWord() . "\n";
}
}
}