<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.ctype.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'intro.ctype.php',
    1 => 'Вступ',
    2 => 'Вступ',
  ),
  'up' => 
  array (
    0 => 'book.ctype.php',
    1 => 'Ctype',
  ),
  'prev' => 
  array (
    0 => 'book.ctype.php',
    1 => 'Ctype',
  ),
  'next' => 
  array (
    0 => 'ctype.setup.php',
    1 => 'Встановлення/налаштування',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/ctype/book.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="intro.ctype" class="preface">
  <h1 class="title">Вступ</h1>
  <p class="para">
   The functions provided by this extension check whether a character
   or string falls into a certain character class according to the
   current locale (see also <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span>).
  </p>
  <p class="para">
   When called with an integer argument these functions
   behave exactly like their C counterparts from
   <var class="filename">ctype.h</var>.
   It means that if an integer smaller than 256 is passed, it will use the
   ASCII value of it to see if it fits in the specified range (digits are in
   0x30-0x39). If the number is between -128 and -1 inclusive then 256 will
   be added and the check will be done on that.
  </p>
  <div class="warning"><strong class="warning">Увага</strong><p class="para"> Починаючи з PHP 8.1.0,
параметр, що не є рядком — застарів. У майбутньому параметр вважатиметься
виключно рядком, а не кодом символу з ASCII. Залежно від наміченої поведінки,
параметр буде або приведено до <span class="type"><a href="language.types.string.php" class="type string">string</a></span>, або явно опрацьовано функцією
<span class="function"><a href="function.chr.php" class="function">chr()</a></span>.</p></div>
  <p class="para">
   When called with a string argument they will check
   every character in the string and will only return
   <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if every character in the string matches the
   requested criteria. Якщо викликано з порожнім рядком — результатом буде <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
  <p class="para">
   Passing anything else but a string or integer will
   return <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> immediately.
  </p>
  <p class="para">
   It should be noted that ctype functions are always preferred over
   regular expressions, and even to some equivalent <code class="literal">&quot;str_*&quot;</code> and <code class="literal">&quot;is_*&quot;</code> functions.
   This is because of the fact that ctype uses a native C library and thus
   processes significantly faster.
  </p>
  <blockquote class="note"><p><strong class="note">Зауваження</strong>: 
   <p class="para">
    These functions are not related to the Python &quot;ctypes&quot; library at all.
    The extension name stems from the <var class="filename">ctype.h</var> C header
    file that their C equivalents are defined in.
   </p>
   <p class="para">
    This extension also predates Python &quot;ctypes&quot; so any confusion
    caused by this naming is hardly PHP&#039;s fault.
   </p>
  </p></blockquote>
 </div><?php manual_footer($setup); ?>