алгоритм – How to decline a full name into genitive?


$fio = "Иванов Иван Иванович";

Is there an algorithm for declining F.I.O. in PHP into genitive case?

Found algorithms for declension of full name, but not in the genitive case or not for PHP. Ideally, 2 different solutions are better (simpler and more difficult).


I am also interested in this topic. copied the first code, added from the bottom:

$r = new NCLNameCaseRu();
echo $r->getFormatted(2);

similarly: Cherepanshina Rafael Michelangelovich.

Scroll to Top