<?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 => 'ja',
  ),
  'this' => 
  array (
    0 => 'migration74.other-changes.php',
    1 => 'その他の変更',
    2 => 'その他の変更',
  ),
  'up' => 
  array (
    0 => 'migration74.php',
    1 => 'PHP 7.3.x から PHP 7.4.x への移行',
  ),
  'prev' => 
  array (
    0 => 'migration74.removed-extensions.php',
    1 => '削除された拡張モジュール',
  ),
  'next' => 
  array (
    0 => 'migration74.windows-support.php',
    1 => 'Windows のサポート',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    '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">その他の変更</h2>

 <div class="sect2" id="migration74.other-changes.performance">
  <h3 class="title">パフォーマンスの向上</h3>

  <div class="sect3" id="migration74.other-changes.performance.core">
   <h4 class="title">PHP コア</h4>
   <p class="para">
    <span class="function"><a href="function.array-key-exists.php" class="function">array_key_exists()</a></span> 関数で使うための特別な VM opcode
    が追加されました。これにより、これが静的に解決される場合のパフォーマンスが向上します。名前空間内にあるコードは、
    <code class="literal">\array_key_exists()</code> を書くか、明示的に関数を import
    する必要があるかもしれません。
   </p>
  </div>

  <div class="sect3" id="migration74.other-changes.performance.pcre">
   <h4 class="title">正規表現 (Perl互換)</h4>
   <p class="para">
    UTF-8モード(<code class="literal">&quot;u&quot;</code> 修飾子)
    が同じ文字列に対して繰り返し呼ばれた(但し異なるオフセットで呼ばれる)場合、UTF-8
    として正しいかどうかの確認は一度だけ行われるようになります。
   </p>
  </div>
 </div>

 <div class="sect2" id="migration74.other-changes.ini">
  <h3 class="title">INIファイルのハンドリングに対する変更</h3>
  <p class="para">
  <a href="ini.core.php#ini.zend.exception-ignore-args" class="link">zend.exception_ignore_args</a> は、
  例外から生成されたスタックトレースに引数を含めたり、除外したりするための新しい
  INIディレクティブです。
  </p>
  <p class="para">
   <a href="opcache.configuration.php#ini.opcache.preload-user" class="link">opcache.preload_user</a>
   は、指定されなければ root
   として実行されてしまう場合(これはセキュリティ上の理由で禁止されています) に、事前ロードされたコードを実行するユーザーアカウントを指定するための新しいINIディレクティブです。
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.pkg-config">
  <h3 class="title">pkg-config への移行</h3>
  <p class="para">
   たくさんの拡張モジュールが、ライブラリへの依存性を検知するために、明示的に
   pkg-config に移行しました。一般的には、このことは 以前 <strong class="option configure">--with-foo-dir=DIR</strong>
   に似た指定をしていたのが、<strong class="option configure">--with-foo</strong>
   が使うだけで済むようになるということです。
   カスタムライブラリのパスは <code class="literal">PKG_CONFIG_PATH</code>
   にディレクトリを追加するか、明示的に <code class="literal">FOO_CFLAGS</code> と
   <code class="literal">FOO_LIBS</code>
   でコンパイルオプションを指定することができます。
  </p>
  <p class="para">
   以下の拡張モジュールや SAPI が影響を受けます:
  </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>
       は、ディレクトリを受け入れません。
      </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> は、ディレクトリを受け入れません。
      </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>
       オプションは、pkg-config が libsystem
       をチェックする用途だけに使われるようになりました。libsystemd
       の最小バージョンは 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> オプションは
       <strong class="option configure">--enable-gd</strong>
       (拡張モジュール全部を有効にする場合) と
       <strong class="option configure">--with-external-gd</strong> 
       (バンドルされたものではなく、外部のlibgdを使う場合)
       になりました。
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-png-dir</strong>
       は削除されました。libpng はビルドに必須です。
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-zlib-dir</strong>
       は削除されました。zlib はビルドに必須です。
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-freetype-dir</strong>
       は、<strong class="option configure">--with-freetype</strong> になりました。
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-jpeg-dir</strong>
       は、<strong class="option configure">--with-jpeg</strong> になりました。
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-webp-dir</strong>
       は、<strong class="option configure">--with-webp</strong> になりました。
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-xpm-dir</strong> 
       は、
       <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> は、ディレクトリを受け入れません。
      </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> は削除されました。
       <strong class="option configure">--enable-intl</strong> が渡された場合、libicu
       が常に必須になります。
      </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> は、ディレクトリを受け入れません。
      </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> は削除されました。
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--enable-libxml</strong>
       は、
       <strong class="option configure">--with-libxml</strong> になりました。
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--with-libexpat-dir</strong> は
       <strong class="option configure">--with-expat</strong>
       にリネームされ、ディレクトリを受け入れなくなりました。
      </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>
       は、
       <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>
       オプションは削除されました。
       <strong class="option configure">--disable-mbregex</strong>
       が指定されない限り、libonig が必須です。
      </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> は、ディレクトリを受け入れません。
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       ディレクトリを指定せずに <strong class="option configure">--with-unixODBC</strong> を使うと、pkg-config
       を利用するようになります(望ましい)。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> は、ディレクトリを受け入れません。
      </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>
       オプションは削除されました。
       代わりに、バンドルされたものではなく、外部のPCREライブラリを使うために <strong class="option configure">--with-external-pcre</strong> が提供されます。
      </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> は、ディレクトリを受け入れません。
      </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> は、ディレクトリを受け入れません。
      </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> は、ディレクトリを受け入れません。
      </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> は、ディレクトリを受け入れません。
      </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> は、ディレクトリを受け入れません。
      </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> は削除されました。
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       <strong class="option configure">--enable-zip</strong>
       は、
       <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 のエスケープ</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> および
   <span class="methodname"><a href="splfileobject.setcsvcontrol.php" class="methodname">SplFileObject::setCsvControl()</a></span>
   は、 <code class="literal">$escape</code>
   パラメータに空文字列を受け入れるようになりました。
   空文字列を指定すると、(RFC 4180 に準拠していない) 独自仕様の PHP のエスケープ機構が無効になります。
  </p>
  <p class="para">
   <span class="function"><a href="function.str-getcsv.php" class="function">str_getcsv()</a></span>
   関数の振る舞いが適切に調整されました(正確には、空文字列がデフォルトを使うことに等しくなります)
  </p>
  <p class="para">
   <span class="methodname"><a href="splfileobject.getcsvcontrol.php" class="methodname">SplFileObject::getCsvControl()</a></span>
   は、3番目の配列要素で空文字列を返すように適切に調整されました。
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.filter">
  <h3 class="title">データのフィルタリング</h3>
  <p class="para">
   <a href="book.filter.php" class="link">filter</a> 拡張モジュールは、
   Unix でビルドする際に <strong class="option configure">--with-pcre-dir</strong>
   が不要になり、 <strong class="command">./configure</strong>
   コマンドで共有ライブラリとして確実にビルドされるようになりました。
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.gd">
  <h3 class="title">GD</h3>
  <p class="para">
   libgd にバンドルされた <span class="function"><a href="function.imagecropauto.php" class="function">imagecropauto()</a></span>
   関数の振る舞いが、システムの 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> は、
     <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 は、システムの libgd
     のアルゴリズムを使うようになりました。
    </span>
   </li>
  </ul>
  <p class="para">
   <span class="function"><a href="function.imagecropauto.php" class="function">imagecropauto()</a></span> 関数の <code class="literal">$mode</code>
   引数のデフォルト値が <strong><code><a href="image.constants.php#constant.img-crop-default">IMG_CROP_DEFAULT</a></code></strong>
   に変更されました。つまり、 <code class="literal">-1</code>
   を渡すことは推奨されなくなりました。
  </p>
  <p class="para">
   <span class="function"><a href="function.imagescale.php" class="function">imagescale()</a></span> 関数が、<code class="literal">$new_width</code> に
   <code class="literal">-1</code> を渡すことによって、
   固定の高さのアスペクト比をサポートするようになりました。
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.hash">
  <h3 class="title">HASH メッセージダイジェストフレームワーク</h3>
  <p class="para">
   <a href="book.hash.php" class="link">hash</a>
   拡張モジュールを無効にすることはできなくなり、PHP
   ビルドに必須の部分として扱われます。
   <a href="book.datetime.php" class="link">date</a> 拡張モジュールも同様です。
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.intl">
  <h3 class="title">国際化関数</h3>
  <p class="para">
   <a href="book.intl.php" class="link">intl</a> 拡張モジュールは、ICU 50.1
   以降が必須になりました。
  </p>
  <p class="para">
   <span class="classname"><a href="class.resourcebundle.php" class="classname">ResourceBundle</a></span>
   は、<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">LDAP</h3>
  <p class="para">
   nsldap と umich_ldap のサポートは削除されました。
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.libxml">
  <h3 class="title">Libxml</h3>
  <p class="para">
   すべての libxmlベースの拡張モジュールは libxml 2.7.6 以降が必須になりました。
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.mbstring">
  <h3 class="title">マルチバイト文字列</h3>
  <p class="para">
   oniguruma ライブラリは PHP本体にバンドルされなくなりました。代わりに、libonig
   がシステムで利用可能になっている必要があります。mbregex
   コンポーネントを無効にするために、<strong class="option configure">--disable-mbregex</strong>
   オプションが代わりに利用できます。
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.opcache">
  <h3 class="title">OPcache</h3>
  <p class="para">
   <strong class="option configure">--disable-opcache-file</strong> と 
   <strong class="option configure">--enable-opcache-file</strong>
   オプションは削除され、<a href="opcache.configuration.php#ini.opcache.file-cache" class="link">opcache.file_cache</a>
   INIディレクティブに置き換えられました。
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.password">
  <h3 class="title">パスワードハッシュ</h3>
  <p class="para">
   <span class="function"><a href="function.password-hash.php" class="function">password_hash()</a></span> と
   <span class="function"><a href="function.password-needs-rehash.php" class="function">password_needs_rehash()</a></span> 関数は、
   <code class="literal">$algo</code> に nullable な <span class="type"><a href="language.types.string.php" class="type string">string</a></span> と
   <span class="type"><a href="language.types.integer.php" class="type int">int</a></span> を受け入れるようになりました。
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.pear">
  <h3 class="title">PEAR</h3>
  <p class="para">
   PEAR (PECL を含む)
   のインストールは、デフォルトで無効になりました。configure オプション
   <strong class="option configure">--with-pear</strong>
   を使うことで明示的に有効にできますが、このオプションは推奨されなくなり、将来的に削除される可能性があります。
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.reflection">
  <h3 class="title">リフレクション</h3>
  <p class="para">
   <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>,
   <span class="classname"><a href="class.reflectionproperty.php" class="classname">ReflectionProperty</a></span>
   クラスの修飾子の定数の数値
   (<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>,
   <code class="literal">IS_STATIC</code>) 
   が変更されました。
  </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> クラスが、新たに
   <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">
   バンドルされていた libsqlite は削除されました。
   <a href="book.sqlite3.php" class="link">SQLite3</a>
   拡張モジュールをビルドするには、libsqlite3 3.7.4 以降が必須になりました。
   <a href="ref.pdo-sqlite.php" class="link">PDO_SQLite</a>
   拡張モジュールをビルドするには、libsqlite3 3.5.0 以降が必須になりました。
  </p>
  <p class="para">
   <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> および <span class="classname"><a href="class.sqlite3result.php" class="classname">SQLite3Result</a></span>
   クラスのシリアル化とその復元は、明示的に禁止されました。
   以前は、これらのクラスのシリアル化は可能でしたが、それを
   復元すると不安定なオブジェクトを返していました。
  </p>
  <p class="para">
   <code class="literal">@param</code> 記法は
   SQLクエリパラメータを示すために使えるようになりました。
  </p>
 </div>

 <div class="sect2" id="migration74.other-changes.zip">
  <h3 class="title">Zip</h3>
  <p class="para">
   バンドルされていた libzip ライブラリは削除されました。
   <a href="book.zip.php" class="link">zip</a> 拡張モジュールをビルドするには、libzip &gt;=
   0.11 が必要になっています。
  </p>
 </div>

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