Transliterator is an easy-to-use class for PHP. It was made to be a class that you could quickly include into a project and have it working right away.
composer require oblak/transliterator
<?php
require 'vendor/autoload.php';
use Oblak\Transliterator;
echo Transliterator::cirToLat('Четири Чавчића риби гризу реп!');
echo Transliterator::latToCir("Da l' si ikada mene voljela?");
Četiri Čavčića ribi grizu rep
Да л' си икада мене вољела?