<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.iconv.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.iconv-strrpos.php',
    1 => 'iconv_strrpos',
    2 => 'Возвращает позицию последнего вхождения подстроки',
  ),
  'up' => 
  array (
    0 => 'ref.iconv.php',
    1 => 'Функции iconv',
  ),
  'prev' => 
  array (
    0 => 'function.iconv-strpos.php',
    1 => 'iconv_strpos',
  ),
  'next' => 
  array (
    0 => 'function.iconv-substr.php',
    1 => 'iconv_substr',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/iconv/functions/iconv-strrpos.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.iconv-strrpos" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">iconv_strrpos</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">iconv_strrpos</span> &mdash; <span class="dc-title">Возвращает позицию последнего вхождения подстроки</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.iconv-strrpos-description">
  <h3 class="title">Описание</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>iconv_strrpos</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$haystack</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$needle</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"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Находит последнюю позицию подстроки <code class="parameter">needle</code>
   в строке <code class="parameter">haystack</code>.
  </p>
  <p class="para">
   В отличие от <span class="function"><a href="function.strrpos.php" class="function">strrpos()</a></span>, <span class="function"><strong>iconv_strrpos()</strong></span>
   возвращает смещение перед искомой строкой в символах, а не
   в байтах. Количество символов трактуется в зависимости от указанной
   параметром <code class="parameter">encoding</code> кодировки.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.iconv-strrpos-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">haystack</code></dt>
     <dd>
      <p class="para">
       Строка, в которой производится поиск.
      </p>
     </dd>
    
    
     <dt><code class="parameter">needle</code></dt>
     <dd>
      <p class="para">
       Искомая подстрока.
      </p>
     </dd>
    
    
     <dt><code class="parameter">encoding</code></dt>
     <dd>
      <p class="para">
       Если параметр <code class="parameter">encoding</code> не указан,
       то подразумевается, что <code class="parameter">string</code>
       имеет кодировку <a href="iconv.configuration.php" class="link">iconv.internal_encoding</a>.
      </p>
     </dd>
    
   </dl>
  </p>
  <p class="para">
   Если <code class="parameter">haystack</code> или
   <code class="parameter">needle</code> не являются строками, они
   будут преобразованы в строку и применены как код символа.
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.iconv-strrpos-returnvalues">
  <h3 class="title">Возвращаемые значения</h3>
  <p class="para">
   Возвращает номер позиции последнего вхождения строки
   <code class="parameter">needle</code> в <code class="parameter">haystack</code>.
  </p>
  <p class="para">
   Если строка <code class="parameter">needle</code> не найдена,
   <span class="function"><strong>iconv_strrpos()</strong></span> возвращает <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
  </p>
  <div class="warning"><strong class="warning">Внимание</strong><p class="simpara">Функция
возвращает как логическое значение <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>,
так и нелогическое значение, которое приводится к <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
Прочитайте раздел
«<a href="language.types.boolean.php" class="link">Логический тип</a>»,
чтобы получить дополнительную информацию.
Используйте <a href="language.operators.comparison.php" class="link">оператор ===</a>
для проверки значения, которое возвращает функция.</p></div>

 </div>


 <div class="refsect1 changelog" id="refsect1-function.iconv-strrpos-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>
       <code class="parameter">encoding</code> теперь допускает значение null.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.iconv-strrpos-seealso">
  <h3 class="title">Смотрите также</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.strrpos.php" class="function" rel="rdfs-seeAlso">strrpos()</a> - Возвращает позицию последнего вхождения подстроки в строку</span></li>
    <li><span class="function"><a href="function.iconv-strpos.php" class="function" rel="rdfs-seeAlso">iconv_strpos()</a> - Возвращает позицию первого вхождения подстроки</span></li>
    <li><span class="function"><a href="function.mb-strrpos.php" class="function" rel="rdfs-seeAlso">mb_strrpos()</a> - Ищет в строке позицию последнего вхождения подстроки</span></li>
   </ul>
  </p>
 </div>


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