<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.mb-strlen.php',
    1 => 'mb_strlen',
    2 => 'Get string length',
  ),
  'up' => 
  array (
    0 => 'ref.mbstring.php',
    1 => 'Multibyte String Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.mb-stristr.php',
    1 => 'mb_stristr',
  ),
  'next' => 
  array (
    0 => 'function.mb-strpos.php',
    1 => 'mb_strpos',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/mbstring/functions/mb-strlen.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.mb-strlen" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mb_strlen</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.6, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">mb_strlen</span> &mdash; <span class="dc-title">Get string length</span></p>

 </div>
   
 <div class="refsect1 description" id="refsect1-function.mb-strlen-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mb_strlen</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"><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.integer.php" class="type int">int</a></span></div>

  <p class="para rdfs-comment">
   Gets the length of a <span class="type"><a href="language.types.string.php" class="type string">string</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mb-strlen-parameters">
  <h3 class="title">Parameter-Liste</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 checked for length.
      </p>
     </dd>
    
    
     <dt><code class="parameter">encoding</code></dt>
     <dd>
      <p class="para">Der Parameter <code class="parameter">encoding</code>
legt die Zeichenkodierung fest. Wird er nicht übergeben, so wird die interne
Zeichenkodierung genutzt.</p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mb-strlen-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Returns the number of characters in
   <span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">string</code> having character encoding
   <code class="parameter">encoding</code>. A multi-byte character is
   counted as 1.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.mb-strlen-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <p class="para">
   If the encoding is unknown, an error of level
   <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> is generated.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.mb-strlen-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">encoding</code> ist nun nullable (akzeptiert den
  <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>-Wert).
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.mb-strlen-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.mb-internal-encoding.php" class="function" rel="rdfs-seeAlso">mb_internal_encoding()</a> - Set/Get internal character encoding</span></li>
    <li><span class="function"><a href="function.grapheme-strlen.php" class="function" rel="rdfs-seeAlso">grapheme_strlen()</a> - Get string length in grapheme units</span></li>
    <li><span class="function"><a href="function.iconv-strlen.php" class="function" rel="rdfs-seeAlso">iconv_strlen()</a> - Returns the character count of string</span></li>
    <li><span class="function"><a href="function.strlen.php" class="function" rel="rdfs-seeAlso">strlen()</a> - Ermitteln der String-L&auml;nge</span></li>
   </ul>
  </p>
 </div>


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