<?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 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.mb-eregi.php',
    1 => 'mb_eregi',
    2 => 'Находит соответствие регулярному выражению с поддержкой многобайтовых символов без учёта регистра',
  ),
  'up' => 
  array (
    0 => 'ref.mbstring.php',
    1 => 'Функции для работы с многобайтовыми строками',
  ),
  'prev' => 
  array (
    0 => 'function.mb-ereg-search-setpos.php',
    1 => 'mb_ereg_search_setpos',
  ),
  'next' => 
  array (
    0 => 'function.mb-eregi-replace.php',
    1 => 'mb_eregi_replace',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/mbstring/functions/mb-eregi.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.mb-eregi" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mb_eregi</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">mb_eregi</span> &mdash; <span class="dc-title">
   Находит соответствие регулярному выражению с поддержкой многобайтовых символов без учёта регистра
  </span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.mb-eregi-description">
  <h3 class="title">Описание</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mb_eregi</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$pattern</code></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.array.php" class="type array">array</a></span> <code class="parameter reference">&$matches</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.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   Выполняет нечувствительный к регистру поиск соответствий регулярному выражению
   с поддержкой многобайтных символов.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mb-eregi-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">pattern</code></dt>
     <dd>
      <p class="para">
       Шаблон поиска.
      </p>
     </dd>
    
    
     <dt><code class="parameter">string</code></dt>
     <dd>
      <p class="para">
       Строка (<span class="type"><a href="language.types.string.php" class="type string">string</a></span>) поиска.
      </p>
     </dd>
    
    
     <dt><code class="parameter">matches</code></dt>
     <dd>
      <p class="para">
       Если найдены совпадения для подстроки <code class="parameter">pattern</code>,
       заключённой в скобки, и функция вызвана с заданным третьим параметром
       <code class="parameter">matches</code>, совпадения будут сохранены в массиве
       <code class="parameter">matches</code>. Если совпадений не найдено,
       параметр <code class="parameter">matches</code> станет пустым массивом.
      </p>
      <p class="para">
       Элемент <var class="varname">$matches[1]</var> будет содержать первую (слева) подстроку, заключённую
       в скобки; элемент <var class="varname">$regs[2]</var> — вторую и так далее.
       Элемент <var class="varname">$matches[0]</var> будет содержать копию всей найденной строки.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mb-eregi-returnvalues">
  <h3 class="title">Возвращаемые значения</h3>
  <p class="para">
   Возвращает <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, если шаблон
   <code class="parameter">pattern</code> соответствует строке <code class="parameter">string</code>,
   иначе <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.mb-eregi-changelog">
  <h3 class="title">Список изменений</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версия</th>
      <th>Описание</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       Теперь эта функция возвращает <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> в случае успешного выполнения. Раньше, если был задан параметр
       <code class="parameter">matches</code> и в строке <code class="parameter">string</code> было найдено
       вхождение шаблона <code class="parameter">pattern</code>, возвращалась длинна найденной подстроки в
       байтах. Если параметр <code class="parameter">matches</code> не задавался или длина найденной
       подстроки равнялась <code class="literal">0</code>, функция возвращала <code class="literal">1</code>.
      </td>
     </tr>

     <tr>
      <td>7.1.0</td>
      <td>
       Функция <span class="function"><strong>mb_eregi()</strong></span> устанавливает значение
       параметра <code class="parameter">matches</code> равным пустому массиву, если ничего не найдено.
       Ранее при отсутствии совпадений параметр <code class="parameter">matches</code> не изменялся.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 notes" id="refsect1-function.mb-eregi-notes">
  <h3 class="title">Примечания</h3>

  <blockquote class="note"><p><strong class="note">Замечание</strong>: <p class="para">Для этой функции будет
использована внутренняя кодировка или кодировка, установленная функцией <span class="function"><a href="function.mb-regex-encoding.php" class="function">mb_regex_encoding()</a></span>.</p></p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.mb-eregi-seealso">
  <h3 class="title">Смотрите также</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.mb-regex-encoding.php" class="function" rel="rdfs-seeAlso">mb_regex_encoding()</a> - Устанавливает или получает кодировку символов
   для многобайтового регулярного выражения</span></li>
    <li><span class="function"><a href="function.mb-ereg.php" class="function" rel="rdfs-seeAlso">mb_ereg()</a> - Находит совпадение регулярному выражению с поддержкой многобайтовых кодировок</span></li>
   </ul>
  </p>
 </div>


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