<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/migration80.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ru',
  ),
  'this' => 
  array (
    0 => 'migration80.other-changes.php',
    1 => 'Другие изменения',
    2 => 'Другие изменения',
  ),
  'up' => 
  array (
    0 => 'migration80.php',
    1 => 'Миграция с PHP 7.4.x на PHP 8.0.x',
  ),
  'prev' => 
  array (
    0 => 'migration80.deprecated.php',
    1 => 'Функциональность, объявленная устаревшей в PHP 8.0.x',
  ),
  'next' => 
  array (
    0 => 'migration74.php',
    1 => 'Миграция с PHP 7.3.x на PHP 7.4.x',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'appendices/migration80/other-changes.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="migration80.other-changes" class="sect1">
 <h2 class="title">Другие изменения</h2>

 <div class="sect2" id="migration80.other-changes.sapi">
  <h3 class="title">Изменения в модулях SAPI</h3>

  <div class="sect3" id="migration80.other-changes.sapi.apache2handler">
   <h4 class="title">Apache2Handler</h4>

   <p class="para">
    Модуль PHP был переименован из <code class="literal">php7_module</code> в
    <code class="literal">php_module</code>.
   </p>
  </div>
 </div>

 <div class="sect2" id="migration80.other-changes.functions">
  <h3 class="title">Изменённые функции</h3>

  <div class="sect3" id="migration80.other-changes.functions.reflection">
   <h4 class="title">Reflection</h4>

   <p class="para">
    Результаты <span class="methodname"><a href="reflectionclass.getconstants.php" class="methodname">ReflectionClass::getConstants()</a></span> и
    <span class="methodname"><a href="reflectionclass.getreflectionconstants.php" class="methodname">ReflectionClass::getReflectionConstants()</a></span> теперь можно
    фильтровать с помощью нового параметра <code class="parameter">filter</code>.
    Добавлены три новые константы для работы с ним:
   </p>
   <p class="para">
    <ul class="simplelist">
     <li><strong><code><a href="class.reflectionclassconstant.php#reflectionclassconstant.constants.is-public">ReflectionClassConstant::IS_PUBLIC</a></code></strong></li>
     <li><strong><code><a href="class.reflectionclassconstant.php#reflectionclassconstant.constants.is-protected">ReflectionClassConstant::IS_PROTECTED</a></code></strong></li>
     <li><strong><code><a href="class.reflectionclassconstant.php#reflectionclassconstant.constants.is-private">ReflectionClassConstant::IS_PRIVATE</a></code></strong></li>
    </ul>
   </p>
  </div>

  <div class="sect3" id="migration80.other-changes.functions.standard">
   <h4 class="title">Стандартные функции</h4>

   <p class="para">
    Математические функции <span class="function"><a href="function.abs.php" class="function">abs()</a></span>, <span class="function"><a href="function.ceil.php" class="function">ceil()</a></span>,
    <span class="function"><a href="function.floor.php" class="function">floor()</a></span> и <span class="function"><a href="function.round.php" class="function">round()</a></span>
    теперь правильно учитывают
    <a href="language.types.declarations.php#language.types.declarations.strict" class="link">объявление <code class="literal">strict_type</code></a>.
    Ранее они приводили первый аргумент к числовому значению даже в режиме строгой типизации.
   </p>
  </div>

  <div class="sect3" id="migration80.other-changes.functions.zip">
   <h4 class="title">Zip</h4>

   <ul class="itemizedlist">
    <li class="listitem">
     <p class="para">
      Методы <span class="methodname"><a href="ziparchive.addglob.php" class="methodname">ZipArchive::addGlob()</a></span> и
      <span class="methodname"><a href="ziparchive.addpattern.php" class="methodname">ZipArchive::addPattern()</a></span> принимают новые значения
      в массиве параметров <code class="parameter">options</code>:
     </p>
     <p class="para">
      <ul class="simplelist">
       <li><code class="literal">flags</code></li>
       <li><code class="literal">comp_method</code></li>
       <li><code class="literal">comp_flags</code></li>
       <li><code class="literal">env_method</code></li>
       <li><code class="literal">enc_password</code></li>
      </ul>
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      У методов <span class="methodname"><a href="ziparchive.addemptydir.php" class="methodname">ZipArchive::addEmptyDir()</a></span>, <span class="methodname"><a href="ziparchive.addfile.php" class="methodname">ZipArchive::addFile()</a></span>
      и <span class="methodname"><a href="ziparchive.addfromstring.php" class="methodname">ZipArchive::addFromString()</a></span> добавлен новый параметр <code class="parameter">flags</code>.
      С помощью него можно управлять кодировкой имени (<strong><code><a href="zip.constants.php#ziparchive.constants.fl-enc-guess">ZipArchive::FL_ENC_<span class="replaceable">*</span></a></code></strong>) и заменой записи
      (<strong><code><a href="zip.constants.php#ziparchive.constants.fl-overwrite">ZipArchive::FL_OVERWRITE</a></code></strong>).
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <span class="methodname"><a href="ziparchive.extractto.php" class="methodname">ZipArchive::extractTo()</a></span> теперь восстанавливает время модификации файла.
     </p>
    </li>
   </ul>
  </div>
 </div>

 <div class="sect2" id="migration80.other-changes.extensions">
  <h3 class="title">Другие изменения в модулях</h3>

  <div class="sect3" id="migration80.other-changes.extensions.curl">
   <h4 class="title">CURL</h4>

   <ul class="itemizedlist">
    <li class="listitem">
     <p class="para">
      Для работы модуля CURL теперь требуется как минимум libcurl 7.29.0.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Устаревший параметр <code class="parameter">version</code> функции <span class="function"><a href="function.curl-version.php" class="function">curl_version()</a></span>
      был удалён.
     </p>
    </li>
   </ul>
  </div>

  <div class="sect3" id="migration80.other-changes.extensions.date">
   <h4 class="title">Дата и время</h4>

   <p class="para">
    <span class="classname"><a href="class.dateperiod.php" class="classname">DatePeriod</a></span> теперь реализует <span class="interfacename"><a href="class.iteratoraggregate.php" class="interfacename">IteratorAggregate</a></span>
    (вместо <span class="interfacename"><a href="class.traversable.php" class="interfacename">Traversable</a></span>).
   </p>
  </div>

  <div class="sect3" id="migration80.other-changes.extensions.dom">
   <h4 class="title">DOM</h4>

   <p class="para">
    <span class="classname"><a href="class.domnamednodemap.php" class="classname">DOMNamedNodeMap</a></span> и <span class="classname"><a href="class.domnodelist.php" class="classname">DOMNodeList</a></span> теперь реализуют
    <span class="interfacename"><a href="class.iteratoraggregate.php" class="interfacename">IteratorAggregate</a></span> (вместо
    <span class="interfacename"><a href="class.traversable.php" class="interfacename">Traversable</a></span>).
   </p>
  </div>

  <div class="sect3" id="migration80.other-changes.extensions.intl">
   <h4 class="title">Intl</h4>

   <p class="para">
    <span class="classname"><a href="class.intlbreakiterator.php" class="classname">IntlBreakIterator</a></span> и <span class="classname"><a href="class.resourcebundle.php" class="classname">ResourceBundle</a></span> теперь реализуют
    <span class="interfacename"><a href="class.iteratoraggregate.php" class="interfacename">IteratorAggregate</a></span> (вместо <span class="interfacename"><a href="class.traversable.php" class="interfacename">Traversable</a></span>).
   </p>
  </div>

  <div class="sect3" id="migration80.other-changes.extensions.enchant">
   <h4 class="title">Enchant</h4>

   <p class="para">
    Модуль enchant теперь использует libenchant-2 по умолчанию, если возможно. libenchant версии 1 все
    ещё поддерживается, но устарел и может быть удалён в будущем.
   </p>
  </div>

  <div class="sect3" id="migration80.other-changes.extensions.gd">
   <h4 class="title">GD</h4>

   <ul class="itemizedlist">
    <li class="listitem">
     <p class="para">
      Параметр <code class="parameter">num_points</code> для <span class="function"><a href="function.imagepolygon.php" class="function">imagepolygon()</a></span>,
      <span class="function"><a href="function.imageopenpolygon.php" class="function">imageopenpolygon()</a></span> и <span class="function"><a href="function.imagefilledpolygon.php" class="function">imagefilledpolygon()</a></span> теперь
      является необязательным, то есть эти функции могут быть вызваны с помощью трёх или четырёх параметров. Если параметр опущен,
      он рассчитывается как <code class="code">count($points)/2</code>.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      Добавлена функция <span class="function"><a href="function.imagegetinterpolation.php" class="function">imagegetinterpolation()</a></span> для получения
      текущего метода интерполяции.
     </p>
    </li>
   </ul>
  </div>

  <div class="sect3" id="migration80.other-changes.extensions.json">
   <h4 class="title">JSON</h4>

   <p class="para">
    Модуль JSON больше нельзя отключить, теперь он является неотъемлемой частью любой сборки PHP,
    как и модуль date.
   </p>
  </div>

  <div class="sect3" id="migration80.other-changes.extensions.mbstring">
   <h4 class="title">MBString</h4>

   <p class="para">
    Таблицы данных Unicode обновлены до версии 13.0.0.
   </p>
  </div>

  <div class="sect3" id="migration80.other-changes.extensions.pdo">
   <h4 class="title">PDO</h4>

   <p class="para">
    <span class="classname"><a href="class.pdostatement.php" class="classname">PDOStatement</a></span> теперь реализует
    <span class="interfacename"><a href="class.iteratoraggregate.php" class="interfacename">IteratorAggregate</a></span> (вместо
    <span class="interfacename"><a href="class.traversable.php" class="interfacename">Traversable</a></span>).
   </p>
  </div>

  <div class="sect3" id="migration80.other-changes.extensions.libxml">
   <h4 class="title">LibXML</h4>

   <p class="para">
    Минимальная необходимая версия libxml - 2.9.0. Это означает, что загрузка внешних объектов
    по умолчанию теперь отключена и поэтому не требуется дополнительных шагов для защиты
    от XXE-атак.
   </p>
  </div>

  <div class="sect3" id="migration80.other-changes.extensions.mysqli">
   <h4 class="title">MySQLi / PDO MySQL</h4>

   <ul class="itemizedlist">
    <li class="listitem">
     <p class="para">
      Если mysqlnd не используется (это вариант по умолчанию и рекомендуется), минимальная поддерживаемая
      версия libmysqlclient теперь 5.5.
     </p>
    </li>
    <li class="listitem">
     <p class="para">
      <span class="classname"><a href="class.mysqli-result.php" class="classname">mysqli_result</a></span> теперь реализует
      <span class="interfacename"><a href="class.iteratoraggregate.php" class="interfacename">IteratorAggregate</a></span> (вместо
      <span class="interfacename"><a href="class.traversable.php" class="interfacename">Traversable</a></span>).
     </p>
    </li>
   </ul>
  </div>

  <div class="sect3" id="migration80.other-changes.extensions.pgsql">
   <h4 class="title">PGSQL / PDO PGSQL</h4>

   <p class="para">
    Для модулей PGSQL и PDO PGSQL теперь требуется как минимум libpq 9.1.
   </p>
  </div>

  <div class="sect3" id="migration80.other-changes.extensions.readline">
   <h4 class="title">Readline</h4>

   <p class="para">
    Вызов <span class="function"><a href="function.readline-completion-function.php" class="function">readline_completion_function()</a></span> перед запуском интерактивной подсказки
    (например, в <a href="ini.core.php#ini.auto-prepend-file" class="link">auto_prepend_file</a>) теперь
    отменяет функцию завершения интерактивной подсказки по умолчанию. Ранее
    <span class="function"><a href="function.readline-completion-function.php" class="function">readline_completion_function()</a></span> работала только при вызове после
    запуска интерактивной подсказки.
   </p>
  </div>

  <div class="sect3" id="migration80.other-changes.extensions.simplexml">
   <h4 class="title">SimpleXML</h4>

   <p class="para">
    <span class="classname"><a href="class.simplexmlelement.php" class="classname">SimpleXMLElement</a></span> теперь реализует
    <span class="interfacename"><a href="class.recursiveiterator.php" class="interfacename">RecursiveIterator</a></span> и включает в себя функционал
    <span class="classname"><a href="class.simplexmliterator.php" class="classname">SimpleXMLIterator</a></span>. <span class="classname"><a href="class.simplexmliterator.php" class="classname">SimpleXMLIterator</a></span> является
    пустым расширением <span class="classname"><a href="class.simplexmlelement.php" class="classname">SimpleXMLElement</a></span>.
   </p>
  </div>
 </div>

 <div class="sect2" id="migration80.other-changes.ini">
  <h3 class="title">Изменения в обработке INI-файлов</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     com.dotnet_version
     - это новая INI-директива для выбора версии платформы .NET, которая будет использоваться
     для объектов <span class="classname"><a href="class.dotnet.php" class="classname">dotnet</a></span>.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     zend.exception_string_param_max_len
     - это новая INI-директива для установки максимальной длины строки в аргументе
     строковой трассировки стека.
    </p>
   </li>
   </ul>
 </div>

 <div class="sect2" id="migration80.other-changes.ebcdic">
  <h3 class="title">EBCDIC</h3>

  <p class="para">
   Цели EBCDIC больше не поддерживаются, хотя маловероятно,
   что они до сих пор работали.
  </p>
 </div>

 <div class="sect2" id="migration80.other-changes.performance">
  <h3 class="title">Производительность</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     Компилятор Just-In-Time (JIT) был добавлен в модуль opcache.
     
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.array-slice.php" class="function">array_slice()</a></span> в массиве без расстояний между элементами больше не будет сканировать весь массив,
     чтобы найти начальное смещение. Это может значительно сократить время выполнения функции
     с большими смещениями и малой длиной.
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <span class="function"><a href="function.strtolower.php" class="function">strtolower()</a></span> теперь использует реализацию SIMD в локали
     <code class="literal">&quot;C&quot;</code> <strong><code><a href="string.constants.php#constant.lc-ctype">LC_CTYPE</a></code></strong> (которая используется по умолчанию).
    </p>
   </li>
  </ul>
 </div>

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