<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.strings.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'function.convert-cyr-string.php',
    1 => 'convert_cyr_string',
    2 => '将字符由一种 Cyrillic 字符转换成另一种',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => '字符串 函数',
  ),
  'prev' => 
  array (
    0 => 'function.chunk-split.php',
    1 => 'chunk_split',
  ),
  'next' => 
  array (
    0 => 'function.convert-uudecode.php',
    1 => 'convert_uudecode',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/strings/functions/convert-cyr-string.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.convert-cyr-string" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">convert_cyr_string</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">convert_cyr_string</span> &mdash; <span class="dc-title">将字符由一种 Cyrillic 字符转换成另一种</span></p>

 </div>

 <div id="function.convert-cyr-string-refsynopsisdiv">
   <div class="warning"><strong class="warning">警告</strong><p class="simpara">本函数已自 PHP 7.4.0
起<em>弃用</em>，自 PHP 8.0.0 起<em>移除</em>。强烈建议不要依赖本函数。</p></div>
 </div>

 <div class="refsect1 description" id="refsect1-function.convert-cyr-string-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>convert_cyr_string</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$str</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$from</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$to</code></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   此函数将给定的字符串从一种
   Cyrillic 字符转换成另一种，返回转换之后的字符串。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.convert-cyr-string-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">str</code></dt>
     <dd>
      <p class="para">
       要转换的字符。
      </p>
     </dd>
    
    
     <dt><code class="parameter">from</code></dt>
     <dd>
      <p class="para">
       单个字符，代表源 Cyrillic 字符集。
      </p>
     </dd>
    
    
     <dt><code class="parameter">to</code></dt>
     <dd>
      <p class="para">
       单个字符，代表了目标 Cyrillic 字符集。
      </p>
     </dd>
    
   </dl>
  </p>
  <p class="para">
   支持的类型有：
   <ul class="itemizedlist">
    <li class="listitem">
     <span class="simpara">
      k - koi8-r
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      w - windows-1251
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      i - iso8859-5
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      a - x-cp866
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      d - x-cp866
     </span>
    </li>
    <li class="listitem">
     <span class="simpara">
      m - x-mac-cyrillic
     </span>
    </li>
   </ul>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.convert-cyr-string-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回转换后的字符串。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.convert-cyr-string-changelog">
  <h3 class="title">更新日志</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>版本</th>
      <th>说明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       此函数已移除。
      </td>
     </tr>

     <tr>
      <td>7.4.0</td>
      <td>
       此函数已废弃。
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 notes" id="refsect1-function.convert-cyr-string-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">注意</strong>: <span class="simpara">此函数可安全用于二进制对象。</span></p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.convert-cyr-string-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.mb-convert-encoding.php" class="function" rel="rdfs-seeAlso">mb_convert_encoding()</a> - 转换字符串，从一个字符编码到另一个字符编码</span></li>
    <li><span class="function"><a href="function.iconv.php" class="function" rel="rdfs-seeAlso">iconv()</a> - 将字符串从一个字符编码转换到另一个字符编码</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>