<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.mbstring.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.mb-convert-case.php',
    1 => 'mb_convert_case',
    2 => 'Perform case folding on a string',
  ),
  'up' => 
  array (
    0 => 'ref.mbstring.php',
    1 => 'Multibyte String Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.mb-chr.php',
    1 => 'mb_chr',
  ),
  'next' => 
  array (
    0 => 'function.mb-convert-encoding.php',
    1 => 'mb_convert_encoding',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mbstring/functions/mb-convert-case.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.mb-convert-case" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mb_convert_case</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">mb_convert_case</span> &mdash; <span class="dc-title">Perform case folding on a string</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.mb-convert-case-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mb_convert_case</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="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$mode</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$encoding</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   Performs case folding on a <span class="type"><a href="language.types.string.php" class="type string">string</a></span>, converted in the way specified by
   <code class="parameter">mode</code>.
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.mb-convert-case-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">string</code></dt>
     <dd>
      <p class="para">
       The <span class="type"><a href="language.types.string.php" class="type string">string</a></span> being converted.
      </p>
     </dd>
    
    
     <dt><code class="parameter">mode</code></dt>
     <dd>
      <p class="para">
       The mode of the conversion. It can be one of 
       <strong><code><a href="mbstring.constants.php#constant.mb-case-upper">MB_CASE_UPPER</a></code></strong>, 
       <strong><code><a href="mbstring.constants.php#constant.mb-case-lower">MB_CASE_LOWER</a></code></strong>, 
       <strong><code><a href="mbstring.constants.php#constant.mb-case-title">MB_CASE_TITLE</a></code></strong>,
       <strong><code><a href="mbstring.constants.php#constant.mb-case-fold">MB_CASE_FOLD</a></code></strong>,
       <strong><code><a href="mbstring.constants.php#constant.mb-case-upper-simple">MB_CASE_UPPER_SIMPLE</a></code></strong>,
       <strong><code><a href="mbstring.constants.php#constant.mb-case-lower-simple">MB_CASE_LOWER_SIMPLE</a></code></strong>,
       <strong><code><a href="mbstring.constants.php#constant.mb-case-title-simple">MB_CASE_TITLE_SIMPLE</a></code></strong>,
       <strong><code><a href="mbstring.constants.php#constant.mb-case-fold-simple">MB_CASE_FOLD_SIMPLE</a></code></strong>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">encoding</code></dt>
     <dd>
      <p class="para">Il parametro <code class="parameter">encoding</code> 
è la codifica dei caratteri. Se è omesso, verrà utilizzata la 
codifica interna.</p>
     </dd>
    
   </dl>
  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.mb-convert-case-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   A case folded version of <code class="parameter">string</code> converted in the
   way specified by <code class="parameter">mode</code>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.mb-convert-case-changelog">
  <h3 class="title">Log delle modifiche</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Versione</th>
       <th>Descrizione</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.3.0</td>
       <td>
        Implemented conditional casing rules for the Greek letter sigma
        which only apply to <strong><code><a href="mbstring.constants.php#constant.mb-case-lower">MB_CASE_LOWER</a></code></strong>
        and <strong><code><a href="mbstring.constants.php#constant.mb-case-title">MB_CASE_TITLE</a></code></strong> modes, not
        to <strong><code><a href="mbstring.constants.php#constant.mb-case-lower-simple">MB_CASE_LOWER_SIMPLE</a></code></strong> and
        <strong><code><a href="mbstring.constants.php#constant.mb-case-title-simple">MB_CASE_TITLE_SIMPLE</a></code></strong>.
       </td>
      </tr>

      <tr>
       <td>7.3.0</td>
       <td>
        Added support for
        <strong><code><a href="mbstring.constants.php#constant.mb-case-fold">MB_CASE_FOLD</a></code></strong>,
        <strong><code><a href="mbstring.constants.php#constant.mb-case-upper-simple">MB_CASE_UPPER_SIMPLE</a></code></strong>,
        <strong><code><a href="mbstring.constants.php#constant.mb-case-lower-simple">MB_CASE_LOWER_SIMPLE</a></code></strong>,
        <strong><code><a href="mbstring.constants.php#constant.mb-case-title-simple">MB_CASE_TITLE_SIMPLE</a></code></strong>, and
        <strong><code><a href="mbstring.constants.php#constant.mb-case-fold-simple">MB_CASE_FOLD_SIMPLE</a></code></strong>
        as <code class="parameter">mode</code>.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.mb-convert-case-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 <span class="function"><strong>mb_convert_case()</strong></span> example</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">mb_convert_case</span><span style="color: #007700">(</span><span style="color: #0000BB">$str</span><span style="color: #007700">, </span><span style="color: #0000BB">MB_CASE_UPPER</span><span style="color: #007700">, </span><span style="color: #DD0000">"UTF-8"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">$str</span><span style="color: #007700">, </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$str </span><span style="color: #007700">= </span><span style="color: #0000BB">mb_convert_case</span><span style="color: #007700">(</span><span style="color: #0000BB">$str</span><span style="color: #007700">, </span><span style="color: #0000BB">MB_CASE_TITLE</span><span style="color: #007700">, </span><span style="color: #DD0000">"UTF-8"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">$str</span><span style="color: #007700">, </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>

  <p class="para">
   <div class="example" id="example-2">
    <p><strong>Example #2 <span class="function"><strong>mb_convert_case()</strong></span> example with non-Latin UTF-8 text</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">"Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$str </span><span style="color: #007700">= </span><span style="color: #0000BB">mb_convert_case</span><span style="color: #007700">(</span><span style="color: #0000BB">$str</span><span style="color: #007700">, </span><span style="color: #0000BB">MB_CASE_UPPER</span><span style="color: #007700">, </span><span style="color: #DD0000">"UTF-8"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">$str</span><span style="color: #007700">, </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$str </span><span style="color: #007700">= </span><span style="color: #0000BB">mb_convert_case</span><span style="color: #007700">(</span><span style="color: #0000BB">$str</span><span style="color: #007700">, </span><span style="color: #0000BB">MB_CASE_TITLE</span><span style="color: #007700">, </span><span style="color: #DD0000">"UTF-8"</span><span style="color: #007700">);<br />echo </span><span style="color: #0000BB">$str</span><span style="color: #007700">, </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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


 <div class="refsect1 notes" id="refsect1-function.mb-convert-case-notes">
  <h3 class="title">Note</h3>
  <p class="para">
   By contrast to the standard case folding functions such as
   <span class="function"><a href="function.strtolower.php" class="function">strtolower()</a></span> and <span class="function"><a href="function.strtoupper.php" class="function">strtoupper()</a></span>,
   case folding is performed on the basis of the Unicode character
   properties. Thus the behaviour of this function is not affected
   by locale settings and it can convert any characters that have
   &#039;alphabetic&#039; property, such a-umlaut (ä).
  </p>
  <p class="para">
   For more information about the Unicode properties, please see <a href="http://www.unicode.org/reports/tr21/" class="link external">&raquo;&nbsp;http://www.unicode.org/reports/tr21/</a>.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.mb-convert-case-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.mb-strtolower.php" class="function" rel="rdfs-seeAlso">mb_strtolower()</a> - Make a string lowercase</span></li>
    <li><span class="function"><a href="function.mb-strtoupper.php" class="function" rel="rdfs-seeAlso">mb_strtoupper()</a> - Trasforma una stringa in lettere maiuscole</span></li>
    <li><span class="function"><a href="function.strtolower.php" class="function" rel="rdfs-seeAlso">strtolower()</a> - Converte in minuscolo una stringa</span></li>
    <li><span class="function"><a href="function.strtoupper.php" class="function" rel="rdfs-seeAlso">strtoupper()</a> - Converte in maiuscolo una stringa</span></li>
    <li><span class="function"><a href="function.ucfirst.php" class="function" rel="rdfs-seeAlso">ucfirst()</a> - Converte in maiuscolo il primo carattere del testo</span></li>
    <li><span class="function"><a href="function.ucwords.php" class="function" rel="rdfs-seeAlso">ucwords()</a> - Converte in maiuscolo il primo carattere di ogni parola di una stringa</span></li>
   </ul>
  </p>
 </div>

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