<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/migration82.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'migration82.incompatible.php',
    1 => 'Backward Incompatible Changes',
    2 => 'Backward Incompatible Changes',
  ),
  'up' => 
  array (
    0 => 'migration82.php',
    1 => 'Перехід від PHP 8.1.x до PHP 8.2.x',
  ),
  'prev' => 
  array (
    0 => 'migration82.constants.php',
    1 => 'New Global Constants',
  ),
  'next' => 
  array (
    0 => 'migration82.deprecated.php',
    1 => 'Deprecated Features',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'appendices/migration82/incompatible.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="migration82.incompatible" class="sect1">
 <h2 class="title">Backward Incompatible Changes</h2>

 <div class="sect2" id="migration82.incompatible.date">
  <h3 class="title">Date</h3>

  <p class="para">
   <span class="methodname"><a href="datetime.createfromimmutable.php" class="methodname">DateTime::createFromImmutable()</a></span> now has a tentative
   return type of <span class="type">static</span>, previously it was <span class="type"><a href="class.datetime.php" class="type DateTime">DateTime</a></span>.
  </p>

  <p class="para">
   <span class="methodname"><a href="datetimeimmutable.createfrommutable.php" class="methodname">DateTimeImmutable::createFromMutable()</a></span> now has a tentative
   return type of <span class="type">static</span>, previously it was <span class="type"><a href="class.datetimeimmutable.php" class="type DateTimeImmutable">DateTimeImmutable</a></span>.
  </p>

  <p class="para">
   <code class="literal">number</code> symbols in <a href="datetime.formats.php#datetime.formats.relative" class="link">relative formats</a>
   no longer accept multiple signs, e.g. <code class="literal">+-2</code>.
  </p>
 </div>

 <div class="sect2" id="migration82.incompatible.odbc">
  <h3 class="title">ODBC</h3>

  <p class="para">
   The ODBC extension now escapes the username and password for the case when
   both a connection string and username/password are passed, and the string
   must be appended to. Before, user values containing values needing escaping
   could have created a malformed connection string, or injected values from
   user-provided data. The escaping rules should be identical to the .NET BCL
   DbConnectionOptions behaviour.
  </p>
 </div>

 <div class="sect2" id="migration82.incompatible.pdo-odbc">
  <h3 class="title">PDO_ODBC</h3>

  <p class="para">
   The PDO_ODBC extension also escapes the username and password when a
   connection string is passed. See the <a href="migration82.incompatible.php#migration82.incompatible.odbc" class="link">change to the ODBC extension</a> for
   further details.
  </p>
 </div>

 <div class="sect2" id="migration82.incompatible.standard">
  <h3 class="title">Standard</h3>

  <p class="para">
   <span class="function"><a href="function.glob.php" class="function">glob()</a></span> now returns an empty <span class="type"><a href="language.types.array.php" class="type array">array</a></span> if all paths are
   restricted by <a href="ini.core.php#ini.open-basedir" class="link">open_basedir</a>.
   Previously it returned <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
   Moreover, a warning is now emitted even if only some paths are restricted by
   <a href="ini.core.php#ini.open-basedir" class="link">open_basedir</a>.
  </p>

  <p class="para">
   <span class="methodname"><a href="filesystemiterator.construct.php" class="methodname">FilesystemIterator::__construct()</a></span>: prior to PHP 8.2.0,
   <strong><code><a href="class.filesystemiterator.php#filesystemiterator.constants.skip-dots">FilesystemIterator::SKIP_DOTS</a></code></strong> constant was always set
   and couldn&#039;t be disabled. In order to maintain the previous behaviour the constant
   must be explicitly set when using the <code class="parameter">flags</code> parameter.
   The default value from <code class="parameter">flags</code> parameter has
   not been modified.
  </p>

  <p class="para">
   <span class="function"><a href="function.strtolower.php" class="function">strtolower()</a></span>,
   <span class="function"><a href="function.strtoupper.php" class="function">strtoupper()</a></span>,
   <span class="function"><a href="function.stristr.php" class="function">stristr()</a></span>,
   <span class="function"><a href="function.stripos.php" class="function">stripos()</a></span>,
   <span class="function"><a href="function.strripos.php" class="function">strripos()</a></span>,
   <span class="function"><a href="function.lcfirst.php" class="function">lcfirst()</a></span>,
   <span class="function"><a href="function.ucfirst.php" class="function">ucfirst()</a></span>,
   <span class="function"><a href="function.ucwords.php" class="function">ucwords()</a></span>,
   and <span class="function"><a href="function.str-ireplace.php" class="function">str_ireplace()</a></span> are no longer locale-sensitive.
   They now perform ASCII case conversion, as if the locale were &quot;C&quot;.
   Localized versions of these functions are available in the <a href="book.mbstring.php" class="link">MBString extension</a>.
   Moreover, <span class="function"><a href="function.array-change-key-case.php" class="function">array_change_key_case()</a></span>, and sorting with
   <strong><code><a href="array.constants.php#constant.sort-flag-case">SORT_FLAG_CASE</a></code></strong> now also use ASCII case conversion.
  </p>

  <p class="para">
   <span class="function"><a href="function.str-split.php" class="function">str_split()</a></span> returns an empty <span class="type"><a href="language.types.array.php" class="type array">array</a></span> for an empty <span class="type"><a href="language.types.string.php" class="type string">string</a></span> now.
   Previously it returned an array with a single empty string entry.
   <span class="function"><a href="function.mb-str-split.php" class="function">mb_str_split()</a></span> is not affected by this change as it was
   already behaving like that.
  </p>

  <p class="para">
   <span class="function"><a href="function.ksort.php" class="function">ksort()</a></span> and <span class="function"><a href="function.krsort.php" class="function">krsort()</a></span> now do numeric string
   comparison under <strong><code><a href="array.constants.php#constant.sort-regular">SORT_REGULAR</a></code></strong> using the standard PHP 8 rules now.
  </p>

  <p class="para">
   <span class="function"><a href="function.var-export.php" class="function">var_export()</a></span> no longer omits the leading backslash for exported classes,
   i.e. these are now fully qualified.
  </p>
 </div>

 <div class="sect2" id="migration82.incompatible.spl">
  <h3 class="title">Standard PHP Library (SPL)</h3>

  <p class="para">
   The following methods now enforce their signature:
   <ul class="simplelist">
    <li><span class="methodname"><strong>SplFileInfo::_bad_state_ex()</strong></span></li>
    <li><span class="methodname"><a href="splfileobject.getcsvcontrol.php" class="methodname">SplFileObject::getCsvControl()</a></span></li>
    <li><span class="methodname"><a href="splfileobject.fflush.php" class="methodname">SplFileObject::fflush()</a></span></li>
    <li><span class="methodname"><a href="splfileobject.ftell.php" class="methodname">SplFileObject::ftell()</a></span></li>
    <li><span class="methodname"><a href="splfileobject.fgetc.php" class="methodname">SplFileObject::fgetc()</a></span></li>
    <li><span class="methodname"><a href="splfileobject.fpassthru.php" class="methodname">SplFileObject::fpassthru()</a></span></li>
   </ul>
  </p>

  <p class="para">
   <span class="methodname"><a href="splfileobject.haschildren.php" class="methodname">SplFileObject::hasChildren()</a></span> now has a tentative
   return type of <span class="type"><a href="language.types.singleton.php" class="type false">false</a></span>, previously it was <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>.
  </p>

  <p class="para">
   <span class="methodname"><a href="splfileobject.getchildren.php" class="methodname">SplFileObject::getChildren()</a></span> now has a tentative
   return type of <span class="type"><a href="language.types.null.php" class="type null">null</a></span>, previously it was
   <span class="type">?</span><span class="type"><span class="type"><a href="class.recursiveiterator.php" class="type RecursiveIterator">RecursiveIterator</a></span><span class="type"></span></span>.
  </p>

  <p class="para">
   <span class="classname"><a href="class.globiterator.php" class="classname">GlobIterator</a></span> now returns an empty <span class="type"><a href="language.types.array.php" class="type array">array</a></span> if all
   paths are restricted by <a href="ini.core.php#ini.open-basedir" class="link">open_basedir</a>.
   Previously it returned <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
   Moreover, a warning is now emitted even if only some paths are restricted by
   <a href="ini.core.php#ini.open-basedir" class="link">open_basedir</a>.
  </p>
 </div>

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