You can install the package via composer:
composer require oblak/number-serbianisation
<?php
use Oblak\Intl\NumberSerbianizer;
use Oblak\Intl\NumberScale;
require 'vendor/autoload.php';
$srn = new NumberSerbianizer();
echo $srn->toWordString(1000); // jedna hiljada
echo $srn->useAccusative()->toWordString(1000); // hiljadu
echo $srn->useScale(NumberScale::Short)->toWordString(1000000000); // jedan bilion
echo $srn->useScale(NumberScale::Long)->toWordString(1000000000); // jedna milijarda
echo $srn->useAccusative()->toWordString(1000000000); // milijardu