// string normalization example
$transliterator = Transliterator::createFromRules(''
. ':: [^йЙ];'
. ':: NFD;'
. ' [:White_Space:]+ > \' \';'
. ':: Upper();'
. ':: [:Nonspacing Mark:] Remove;'
. ':: NFC;', Transliterator::FORWARD);
$str = 'ручей příklad';
echo str_replace('й', 'Й', $transliterator->transliterate($str));
// result:
// РУЧЕЙ PRIKLAD