<?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.strtolower.php',
    1 => 'strtolower',
    2 => '将字符串转化为小写',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => '字符串 函数',
  ),
  'prev' => 
  array (
    0 => 'function.strtok.php',
    1 => 'strtok',
  ),
  'next' => 
  array (
    0 => 'function.strtoupper.php',
    1 => 'strtoupper',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/strings/functions/strtolower.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.strtolower" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">strtolower</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">strtolower</span> &mdash; <span class="dc-title">将字符串转化为小写</span></p>

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

  <p class="para rdfs-comment">
  将 <code class="parameter">string</code> 中所有的 ASCII 字母字符转换为小写并返回。
  </p>
  <p class="para">
   <code class="literal">&quot;A&quot;</code>（0x41）到 <code class="literal">&quot;Z&quot;</code>（0x5a）范围内的字节会通过将每个字节值加 32 转为相应的小写字母。
  </p>
  <p class="para">
   这可用于转换用 UTF-8 编码的字符串中的 ASCII 字符，但会忽略多字节 UTF-8 字符。要转换多字节非
   ASCII 字符，请使用 <span class="function"><a href="function.mb-strtolower.php" class="function">mb_strtolower()</a></span>。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.strtolower-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">string</code></dt>
     <dd>
      <p class="para">
       输入字符串。
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


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


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

    </thead>

    <tbody class="tbody">
     
 <tr>
  <td>8.2.0</td>
  <td>
   大小写转换不在依赖于使用 <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span> 设置的区域。只会转换 ASCII 字符。
  </td>
 </tr>


    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.strtolower-examples">
  <h3 class="title">示例</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>示例 #1 <span class="function"><strong>strtolower()</strong></span> 示例</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$str </span><span style="color: #007700">= </span><span style="color: #DD0000">"Mary Had A Little Lamb and She LOVED It So"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$str </span><span style="color: #007700">= </span><span style="color: #0000BB">strtolower</span><span style="color: #007700">(</span><span style="color: #0000BB">$str</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">$str</span><span style="color: #007700">; </span><span style="color: #FF8000">// 打印 mary had a little lamb and she loved it so<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>   
  </p>
 </div>


 <div class="refsect1 notes" id="refsect1-function.strtolower-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.strtolower-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.strtoupper.php" class="function" rel="rdfs-seeAlso">strtoupper()</a> - 将字符串转化为大写</span></li>
    <li><span class="function"><a href="function.ucfirst.php" class="function" rel="rdfs-seeAlso">ucfirst()</a> - 将字符串的首字母转换为大写</span></li>
    <li><span class="function"><a href="function.ucwords.php" class="function" rel="rdfs-seeAlso">ucwords()</a> - 将字符串中每个单词的首字母转换为大写</span></li>
    <li><span class="function"><a href="function.mb-strtolower.php" class="function" rel="rdfs-seeAlso">mb_strtolower()</a> - 使字符串小写</span></li>
   </ul>
  </p>
 </div>


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