<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/migration74.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'migration74.other-changes.php',
    1 => 'Other Changes',
    2 => 'Other Changes',
  ),
  'up' => 
  array (
    0 => 'migration74.php',
    1 => 'Migrating from PHP 7.3.x to PHP 7.4.x',
  ),
  'prev' => 
  array (
    0 => 'migration74.removed-extensions.php',
    1 => 'Removed Extensions',
  ),
  'next' => 
  array (
    0 => 'migration74.windows-support.php',
    1 => 'Windows Support',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'appendices/migration74/other-changes.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="migration74.other-changes" class="sect1">
 <h2 class="title">Other Changes</h2>

 <div class="sect2" id="migration74.other-changes.performance">
  <h3 class="title">Performance Improvements</h3>

  <div class="sect3" id="migration74.other-changes.performance.core">
   <h4 class="title">PHP Core</h4>
   <p class="para">
    A specialized VM opcode for the <span class="function"><a href="function.array-key-exists.php" class="function">array_key_exists()</a></span>
    function has been added, which improves performance of this function
    if it can be statically resolved. In namespaced code, this may require
    writing <code class="literal">\array_key_exists()</code> or explicitly importing
    the function.
   </p>
  </div>

  <div class="sect3" id="migration74.other-changes.performance.pcre">
   <h4 class="title">Regular Expressions (Perl-Compatible)</h4>
   <p class="para">
    When <span class="function"><a href="function.preg-match.php" class="function">preg_match()</a></span> in UTF-8 mode (<code class="literal">&quot;u&quot;</code> modifier)
    is repeatedly called on the same string (but possibly different offsets),
    it will only be checked for UTF-8 validity once.
   </p>
  </div>
 </div>

 <div class="sect2" id="migration74.other-changes.ini">
  <h3 class="title">Changes to INI File Handling</h3>
  <p class="para">
   <a href="ini.core.php#ini.zend.exception-ignore-args" class="link">zend.exception_ignore_args</a> is a new INI directive
   for including or excluding arguments from stack traces generated
   from exceptions.
  </p>
  <p class="para">
   <a href="opcache.configuration.php#ini.opcache.preload-user" class="link">opcache.preload_user</a> is a new INI directive
   for specifying the user account under which preloading
   code is execute if it would otherwise be run as root (which is not
   allowed for security reasons).
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.pkg-config">
  <h3 class="title">Migration to pkg-config</h3>
  <p class="para">
   A number of extensions have been migrated to exclusively use pkg-config for the
   detection of library dependencies. Generally, this means that instead of using
   <strong class="option configure">--with-foo-dir=DIR</strong> or similar only
   <strong class="option configure">--with-foo</strong> is used. Custom library paths can be
   specified either by adding additional directories to <code class="literal">PKG_CONFIG_PATH</code>
   or by explicitly specifying compilation options through <code class="literal">FOO_CFLAGS</code>
   and <code class="literal">FOO_LIBS</code>.
  </p>
  <p class="para">
   The following extensions and SAPIs are affected:
  </p>

  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">CURL:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-curl</strong> no longer accepts a directory.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">Enchant:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-enchant</strong> no longer accepts a directory.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">FPM:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-fpm-systemd</strong> now uses only pkg-config
       for libsystem checks. The libsystemd minimum required version is 209.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">GD:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-gd</strong> becomes
       <strong class="option configure">--enable-gd</strong>
       (whether to enable the extension at all) and
       <strong class="option configure">--with-external-gd</strong>
       (to opt into using an external libgd, rather than the bundled one).
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-png-dir</strong> has been removed. libpng is required.
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-zlib-dir</strong> has been removed. zlib is required.
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-freetype-dir</strong>
       becomes <strong class="option configure">--with-freetype</strong>
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-jpeg-dir</strong> becomes
       <strong class="option configure">--with-jpeg</strong>
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-webp-dir</strong> becomes
       <strong class="option configure">--with-webp</strong>
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-xpm-dir</strong> becomes
       <strong class="option configure">--with-xpm</strong>
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">IMAP:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-kerberos-systemd</strong> no longer accepts a directory.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">Intl:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-icu-dir</strong> has been removed.
       If <strong class="option configure">--enable-intl</strong> is passed,
       then libicu is always required.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">LDAP:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-ldap-sasl</strong> no longer accepts a directory.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">Libxml:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-libxml-dir</strong> has been removed.
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--enable-libxml</strong> becomes
       <strong class="option configure">--with-libxml</strong>.
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-libexpat-dir</strong> has been renamed to
       <strong class="option configure">--with-expat</strong> and no longer accepts a directory.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">Litespeed:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-litespeed</strong> becomes
       <strong class="option configure">--enable-litespeed</strong>.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">Mbstring:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-onig</strong> has been removed.
       Unless <strong class="option configure">--disable-mbregex</strong>
       has been passed, libonig is required.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">ODBC:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-iodbc</strong> no longer accepts a directory.
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-unixODBC</strong> without a directory now uses
       pkg-config (preferred). Directory is still accepted for old versions without libodbc.pc.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">OpenSSL:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-openssl</strong> no longer accepts a directory.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">PCRE:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-pcre-regex</strong> has been removed.
       Instead <strong class="option configure">--with-external-pcre</strong>
       is provided to opt into using an external PCRE library, rather
       than the bundled one.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">PDO_SQLite:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-pdo-sqlite</strong> no longer accepts a directory.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">Readline:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-libedit</strong> no longer accepts a directory.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">Sodium:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-sodium</strong> no longer accepts a directory.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">SQLite3:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-sqlite3</strong> no longer accepts a directory.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">XSL:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-xsl</strong> no longer accepts a directory.
      </span>
     </li>
    </ul>
   </li>

   <li class="listitem">
    <span class="simpara">Zip:</span>
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-libzip</strong> has been removed.
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--enable-zip</strong> becomes
       <strong class="option configure">--with-zip</strong>.
      </span>
     </li>
    </ul>
   </li>

  </ul>
 </div>

 <div class="sect2" id="migration74.other-changes.csv">
  <h3 class="title">CSV escaping</h3>
  <p class="para">
   <span class="function"><a href="function.fputcsv.php" class="function">fputcsv()</a></span>,
   <span class="function"><a href="function.fgetcsv.php" class="function">fgetcsv()</a></span>,
   <span class="methodname"><a href="splfileobject.fputcsv.php" class="methodname">SplFileObject::fputcsv()</a></span>, 
   <span class="methodname"><a href="splfileobject.fgetcsv.php" class="methodname">SplFileObject::fgetcsv()</a></span>, and
   <span class="methodname"><a href="splfileobject.setcsvcontrol.php" class="methodname">SplFileObject::setCsvControl()</a></span>
   now accept an empty string as <code class="literal">$escape</code> argument,
   which disables the proprietary PHP escaping mechanism.
  </p>
  <p class="para">
   The behavior of <span class="function"><a href="function.str-getcsv.php" class="function">str_getcsv()</a></span> has been
   adjusted accordingly (formerly, an empty string was identical
   to using the default).
  </p>
  <p class="para">
   <span class="methodname"><a href="splfileobject.getcsvcontrol.php" class="methodname">SplFileObject::getCsvControl()</a></span> now may also
   return an empty string for the third array element, accordingly.
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.filter">
  <h3 class="title">Data Filtering</h3>
  <p class="para">
   The <a href="book.filter.php" class="link">filter</a> extension no longer exposes
   <strong class="option configure">--with-pcre-dir</strong> for Unix builds and can now reliably
   be built as shared when using <strong class="command">./configure</strong>
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.gd">
  <h3 class="title">GD</h3>
  <p class="para">
   The behavior of <span class="function"><a href="function.imagecropauto.php" class="function">imagecropauto()</a></span> in the bundled
   libgd has been synced with that of system libgd:
  </p>
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <strong><code><a href="image.constants.php#constant.img-crop-default">IMG_CROP_DEFAULT</a></code></strong> is no longer falling
     back to <strong><code><a href="image.constants.php#constant.img-crop-sides">IMG_CROP_SIDES</a></code></strong>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     Threshold-cropping now uses the algorithm of system libgd
    </span>
   </li>
  </ul>
  <p class="para">
   The default <code class="literal">$mode</code> parameter of
   <span class="function"><a href="function.imagecropauto.php" class="function">imagecropauto()</a></span> has been changed to
   <strong><code><a href="image.constants.php#constant.img-crop-default">IMG_CROP_DEFAULT</a></code></strong>; passing <code class="literal">-1</code>
   is now deprecated.
  </p>
  <p class="para">
   <span class="function"><a href="function.imagescale.php" class="function">imagescale()</a></span> now supports aspect ratio preserving
   scaling to a fixed height by passing <code class="literal">-1</code>
   as <code class="literal">$new_width</code>.
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.hash">
  <h3 class="title">HASH Message Digest Framework</h3>
  <p class="para">
   The <a href="book.hash.php" class="link">hash</a> extension cannot be disabled
   anymore and is always an integral part of any PHP build, similar to
   the <a href="book.datetime.php" class="link">date</a> extension.
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.intl">
  <h3 class="title">Intl</h3>
  <p class="para">
   The <a href="book.intl.php" class="link">intl</a> extension
   now requires at least ICU 50.1.
  </p>
  <p class="para">
   <span class="classname"><a href="class.resourcebundle.php" class="classname">ResourceBundle</a></span> now implements
   <span class="interfacename"><a href="class.countable.php" class="interfacename">Countable</a></span>.
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.ldap">
  <h3 class="title">Lightweight Directory Access Protocol</h3>
  <p class="para">
   Support for nsldap and umich_ldap has been removed.
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.libxml">
  <h3 class="title">Libxml</h3>
  <p class="para">
   All libxml-based extensions now require libxml 2.7.6 or newer.
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.mbstring">
  <h3 class="title">Multibyte String</h3>
  <p class="para">
   The oniguruma library is no longer bundled with PHP, instead libonig needs
   to be available on the system. Alternatively
   <strong class="option configure">--disable-mbregex</strong> can be used to disable
   the mbregex component.
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.opcache">
  <h3 class="title">OPcache</h3>
  <p class="para">
   The <strong class="option configure">--disable-opcache-file</strong> and
   <strong class="option configure">--enable-opcache-file</strong> configure options
   have been removed in favor of the
   <a href="opcache.configuration.php#ini.opcache.file-cache" class="link">opcache.file_cache</a> INI directive.
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.password">
  <h3 class="title">Password Hashing</h3>
  <p class="para">
   The <span class="function"><a href="function.password-hash.php" class="function">password_hash()</a></span> and
   <span class="function"><a href="function.password-needs-rehash.php" class="function">password_needs_rehash()</a></span> functions
   now accept nullable <span class="type"><a href="language.types.string.php" class="type string">string</a></span> and <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> for <code class="literal">$algo</code> argument.
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.pear">
  <h3 class="title">PEAR</h3>
  <p class="para">
   Installation of PEAR (including PECL) is no longer enabled by default. It
   can be explicitly enabled using <strong class="option configure">--with-pear</strong>.
   This option is deprecated and may be removed in the future.
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.reflection">
  <h3 class="title">Reflection</h3>
  <p class="para">
   The numeric values of the modifier constants
   (<code class="literal">IS_ABSTRACT</code>,
   <code class="literal">IS_DEPRECATED</code>,
   <code class="literal">IS_EXPLICIT_ABSTRACT</code>,
   <code class="literal">IS_FINAL</code>,
   <code class="literal">IS_IMPLICIT_ABSTRACT</code>,
   <code class="literal">IS_PRIVATE</code>,
   <code class="literal">IS_PROTECTED</code>,
   <code class="literal">IS_PUBLIC</code>, and
   <code class="literal">IS_STATIC</code>) on the
   <span class="classname"><a href="class.reflectionclass.php" class="classname">ReflectionClass</a></span>,
   <span class="classname"><a href="class.reflectionfunction.php" class="classname">ReflectionFunction</a></span>,
   <span class="classname"><a href="class.reflectionmethod.php" class="classname">ReflectionMethod</a></span>,
   <span class="classname"><a href="class.reflectionobject.php" class="classname">ReflectionObject</a></span>, and
   <span class="classname"><a href="class.reflectionproperty.php" class="classname">ReflectionProperty</a></span>
   classes have changed.
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.simplexml">
  <h3 class="title">SimpleXML</h3>
  <p class="para">
   <span class="classname"><a href="class.simplexmlelement.php" class="classname">SimpleXMLElement</a></span> now implements
   <span class="interfacename"><a href="class.countable.php" class="interfacename">Countable</a></span>.
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.sqlite3">
  <h3 class="title">SQLite3</h3>
  <p class="para">
   The bundled libsqlite has been removed. To build the
   <a href="book.sqlite3.php" class="link">SQLite3</a> extension a
   system libsqlite3 ≥ 3.7.4 is now required. To build the
   <a href="ref.pdo-sqlite.php" class="link">PDO_SQLite</a> extension
   a system libsqlite3 ≥ 3.5.0 is now required.
  </p>
  <p class="para">
   Serialization and unserialization of <span class="classname"><a href="class.sqlite3.php" class="classname">SQLite3</a></span>,
   <span class="classname"><a href="class.sqlite3stmt.php" class="classname">SQLite3Stmt</a></span> and <span class="classname"><a href="class.sqlite3result.php" class="classname">SQLite3Result</a></span>
   is now explicitly forbidden. Formerly, serialization of instances of
   these classes was possible, but unserialization yielded unusable objects.
  </p>
  <p class="para">
   The <code class="literal">@param</code> notation can now also be used to
   denote SQL query parameters.
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.zip">
  <h3 class="title">Zip</h3>
  <p class="para">
   The bundled libzip library has been removed.
   A system libzip &gt;= 0.11 is now necessary to build the
   <a href="book.zip.php" class="link">zip</a> extension.
  </p>
 </div>

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