<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.intl.grapheme.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.grapheme-str-split.php',
    1 => 'grapheme_str_split',
    2 => 'Split a string into an array',
  ),
  'up' => 
  array (
    0 => 'ref.intl.grapheme.php',
    1 => 'Grapheme Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.grapheme-extract.php',
    1 => 'grapheme_extract',
  ),
  'next' => 
  array (
    0 => 'function.grapheme-stripos.php',
    1 => 'grapheme_stripos',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/intl/grapheme/grapheme-str-split.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.grapheme-str-split" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">grapheme_str_split</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.4.0)</p><p class="refpurpose"><span class="refname">grapheme_str_split</span> &mdash; <span class="dc-title">Split a string into an array</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.grapheme-str-split-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>grapheme_str_split</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">$length</code><span class="initializer"> = 1</span></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="simpara">
   This function will return an array of strings,
   it is a version of <span class="function"><a href="function.str-split.php" class="function">str_split()</a></span>
   with support for grapheme cluster byte characters.
   If the <code class="parameter">length</code> parameter is specified,
   the string is broken down into chunks of the specified length
   in grapheme clusters (not bytes).
  </p>
  </div>


 <div class="refsect1 parameters" id="refsect1-function.grapheme-str-split-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <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> to split into grapheme clusters or chunks.
      <code class="parameter">string</code> must be valid UTF-8.
     </p>
    </dd>
   
   
    <dt><code class="parameter">length</code></dt>
    <dd>
     <p class="para">
      Each element of the returned array will be composed of <code class="parameter">length</code> grapheme clusters.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.grapheme-str-split-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="simpara">
   <span class="function"><strong>grapheme_str_split()</strong></span> returns an array of strings, Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben..
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.grapheme-str-split-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <p class="simpara">
   If <code class="parameter">length</code> is less than <code class="literal">1</code>,
   a <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> will be thrown.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.grapheme-str-split-seealso">
  <h3 class="title">Siehe auch</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.str-split.php" class="function" rel="rdfs-seeAlso">str_split()</a> - Konvertiert einen String in ein Array</span></li>
   <li><span class="function"><a href="function.mb-str-split.php" class="function" rel="rdfs-seeAlso">mb_str_split()</a> - Given a multibyte string, return an array of its characters</span></li>
   <li>
    <a href="http://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries" class="link external">&raquo;&nbsp;
     Unicode Text Segmentation: Grapheme Cluster Boundaries
    </a>
   </li>
  </ul>
 </div>

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