convert_cyr_string

(PHP 4, PHP 5, PHP 7)

convert_cyr_stringConvert from one Cyrillic character set to another

Увага

Ця функція ЗАСТАРІЛА, починаючи з PHP 7.4.0, та ВИЛУЧЕНА в PHP 8.0.0. Вкрай не рекомендується на неї покладатися.

Опис

convert_cyr_string(string $str, string $from, string $to): string

Converts from one Cyrillic character set to another.

Параметри

str

The string to be converted.

from

The source Cyrillic character set, as a single character.

to

The target Cyrillic character set, as a single character.

Supported characters are:

  • k - koi8-r
  • w - windows-1251
  • i - iso8859-5
  • a - x-cp866
  • d - x-cp866
  • m - x-mac-cyrillic

Значення, що повертаються

Returns the converted string.

Журнал змін

Версія Опис
8.0.0 Removed this function.
7.4.0 Deprecated this function.

Примітки

Зауваження: Ця функція є бінарно безпечною.

Прогляньте також

  • mb_convert_encoding() - Convert a string from one character encoding to another
  • iconv() - Convert a string from one character encoding to another