<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.intlchar.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'intlchar.enumchartypes.php',
    1 => 'IntlChar::enumCharTypes',
    2 => 'Enumerate all code points with their Unicode general categories',
  ),
  'up' => 
  array (
    0 => 'class.intlchar.php',
    1 => 'IntlChar',
  ),
  'prev' => 
  array (
    0 => 'intlchar.enumcharnames.php',
    1 => 'IntlChar::enumCharNames',
  ),
  'next' => 
  array (
    0 => 'intlchar.foldcase.php',
    1 => 'IntlChar::foldCase',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/intl/intlchar/enumchartypes.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="intlchar.enumchartypes" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">IntlChar::enumCharTypes</h1>
  <p class="verinfo">(PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">IntlChar::enumCharTypes</span> &mdash; <span class="dc-title">Enumerate all code points with their Unicode general categories</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-intlchar.enumchartypes-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><strong>IntlChar::enumCharTypes</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.callable.php" class="type callable">callable</a></span> <code class="parameter">$callback</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="para rdfs-comment">
   Enumerates efficiently all code points with their Unicode general categories. This is useful for building data
   structures, for enumerating all assigned code points, etc.
  </p>
  <p class="para">
   For each contiguous range of code points with a given general category (&quot;character type&quot;), the
   <code class="parameter">callback</code> function is called. Adjacent ranges have different types. The Unicode Standard
   guarantees that the numeric value of the type is 0..31.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-intlchar.enumchartypes-parameters">
  <h3 class="title">Параметри</h3>
  <dl>
   
    <dt><code class="parameter">callback</code></dt>
    <dd>
     <p class="para">
      The function that is to be called for each contiguous range of code points with the same general category.
      The following three arguments will be passed into it:
      <ul class="simplelist">
       <li><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="literal">$start</code> - The starting code point of the range</li>
       <li><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="literal">$end</code> - The ending code point of the range</li>
       <li><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="literal">$name</code> - The category type (one of the <code class="literal">IntlChar::CHAR_CATEGORY_*</code> constants)</li>
      </ul>
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-intlchar.enumchartypes-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Не повертає значень.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-intlchar.enumchartypes-examples">
  <h3 class="title">Приклади</h3>
  <div class="example" id="example-1">
   <p><strong>Приклад #1 Enumerating over a sample range of code points</strong></p>
   <div class="example-contents">
    <div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">enumCharTypes</span><span style="color: #007700">(function(</span><span style="color: #0000BB">$start</span><span style="color: #007700">, </span><span style="color: #0000BB">$end</span><span style="color: #007700">, </span><span style="color: #0000BB">$type</span><span style="color: #007700">) {<br />    </span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"U+%04x through U+%04x are in category %d\n"</span><span style="color: #007700">, </span><span style="color: #0000BB">$start</span><span style="color: #007700">, </span><span style="color: #0000BB">$end</span><span style="color: #007700">, </span><span style="color: #0000BB">$type</span><span style="color: #007700">);<br />});<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>Поданий вище приклад
виведе:</p></div>
   <div class="example-contents screen">
    <div class="examplescode"><pre class="examplescode">U+0000 through U+0020 are in category 15
U+0020 through U+0021 are in category 12
U+0021 through U+0024 are in category 23
U+0024 through U+0025 are in category 25
U+0025 through U+0028 are in category 23
U+0028 through U+0029 are in category 20
U+0029 through U+002a are in category 21
U+002a through U+002b are in category 23
U+002b through U+002c are in category 24
U+002c through U+002d are in category 23
U+002d through U+002e are in category 19
U+002e through U+0030 are in category 23
U+0030 through U+003a are in category 9
...</pre>
</div>
   </div>
  </div>
 </div>


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