1. Go to this page and download the library: Download staticall/petrovich-php 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/ */
mb_internal_encoding('UTF-8');
rovich(Staticall\Petrovich\Loader::load('path-to-vendor/cloudloyalty/petrovich-rules/rules.json'));
// Родительный падеж
// Важно! На данный момент, такой порядок обязателен
$fullNameGenitive = $petrovich->inflectFullName('Пушкин Александр Сергеевич', Staticall\Petrovich\Ruleset::CASE_GENITIVE, Staticall\Petrovich\Ruleset::GENDER_MALE); // Пушкина Александра Сергеевича