<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/migration73.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'migration73.other-changes.php',
    1 => 'その他の変更',
    2 => 'その他の変更',
  ),
  'up' => 
  array (
    0 => 'migration73.php',
    1 => 'PHP 7.2.x から PHP 7.3.x への移行',
  ),
  'prev' => 
  array (
    0 => 'migration73.deprecated.php',
    1 => 'PHP 7.3.x で推奨されなくなる機能',
  ),
  'next' => 
  array (
    0 => 'migration73.windows-support.php',
    1 => 'Windows のサポート',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'appendices/migration73/other-changes.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="migration73.other-changes" class="sect1">
 <h2 class="title">その他の変更</h2>

 <div class="sect2" id="migration73.other-changes.core">
  <h3 class="title">PHP コア</h3>

  <div class="sect3" id="migration73.other-changes.core.setcookie">
   <h4 class="title">set(raw)cookie 関数は $option 引数を受け入れるように</h4>

   <p class="para">
    <span class="function"><a href="function.setcookie.php" class="function">setcookie()</a></span> および <span class="function"><a href="function.setrawcookie.php" class="function">setrawcookie()</a></span>
    関数は、次のようなシグネチャもサポートするようになりました:
    <div class="methodsynopsis dc-description">
     <span class="methodname"><a href="function.setcookie.php" class="methodname">setcookie</a></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$name</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$value</code><span class="initializer"> = &quot;&quot;</span></span>, <span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$options</code><span class="initializer"> = []</span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

    <code class="literal">$options</code> は
    <code class="literal">&quot;expires&quot;</code>, <code class="literal">&quot;path&quot;</code>,
    <code class="literal">&quot;domain&quot;</code>, <code class="literal">&quot;secure&quot;</code>,
    <code class="literal">&quot;httponly&quot;</code> および <code class="literal">&quot;samesite&quot;</code>
    をキーとして受け付ける連想配列です。
   </p>
  </div>

  <div class="sect3" id="migration73.other-changes.core.syslog">
   <h4 class="title">新しい syslog INI ディレクティブ</h4>

   <p class="para">
    <a href="errorfunc.configuration.php#ini.error-log" class="link">error_log</a> が
    <code class="literal">syslog</code> に設定された場合、
    ロギングをカスタマイズするため、次の ini ディレクティブが追加されました:
    <code class="literal">syslog</code>:
    <dl>
     
      <dt><a href="errorfunc.configuration.php#ini.syslog.facility" class="link">syslog.facility</a></dt>
      <dd>
       <span class="simpara">
        どのタイプのプログラムがメッセージをロギングするかを指定します
       </span>
      </dd>
     
     
      <dt><a href="errorfunc.configuration.php#ini.syslog.filter" class="link">syslog.filter</a></dt>
      <dd>
       <span class="simpara">
        ログメッセージをフィルタするために、
        サポートされているフィルタタイプを指定します。
        サポートされているのは、<code class="literal">all</code>,
        <code class="literal">no-ctrl</code> そして <code class="literal">ascii</code> です。

        PHP 7.3.8 以降では、
        それより前のバージョンでの振る舞いを復元する <code class="literal">raw</code> も使えます。
        このフィルタは、<span class="function"><a href="function.syslog.php" class="function">syslog()</a></span> をコールした際にも影響します。
       </span>
      </dd>
     
     
      <dt><a href="errorfunc.configuration.php#ini.syslog.ident" class="link">syslog.ident</a></dt>
      <dd>
       <span class="simpara">
        メッセージの先頭に付加される ident 文字列を指定します。
       </span>
      </dd>
     
    </dl>
   </p>
  </div>

  <div class="sect3" id="migration73.other-changes.core.gc">
   <h4 class="title">ガベージコレクション</h4>

   <p class="para">
    <a href="features.gc.collecting-cycles.php" class="link">cyclic GC</a>
    が改良されました。かなりのパフォーマンスの向上に繋がる可能性があります。
   </p>
  </div>

  <div class="sect3" id="migration73.other-changes.core.misc">
   <h4 class="title">雑多な変更</h4>

   <p class="para">
    <span class="function"><a href="function.var-export.php" class="function">var_export()</a></span> 関数は、
    存在しないメソッド <span class="methodname"><strong>stdClass::__setState()</strong></span>
    を使わず、
    オブジェクトにキャストされた配列
    (<code class="code">(object) array( ... )</code>) として <span class="classname"><a href="class.stdclass.php" class="classname">stdClass</a></span> を
    エクスポートするようになりました。
   </p>

   <p class="para">
    <span class="function"><a href="function.debug-zval-dump.php" class="function">debug_zval_dump()</a></span>
    関数は、再帰的な配列やオブジェクトを表示する方法が、
    <span class="function"><a href="function.var-dump.php" class="function">var_dump()</a></span> と同じになるように変更されました。
    そうした配列やオブジェクトは、もはや二度表示されません。
   </p>

   <p class="para">
    <span class="function"><a href="function.array-push.php" class="function">array_push()</a></span> および <span class="function"><a href="function.array-unshift.php" class="function">array_unshift()</a></span> 
    関数は、単一の引数でも呼び出せるようになりました。これは
    spread演算子と共に使うと特に便利です。
   </p>
  </div>

 </div>

 <div class="sect2" id="migration73.other-changes.phpdbg">
  <h3 class="title">対話的なPHPデバッガ</h3>

  <p class="para">
   使われていなかった定数 <strong><code><a href="phpdbg.constants.php#constant.phpdbg-file">PHPDBG_FILE</a></code></strong>,
   <strong><code><a href="phpdbg.constants.php#constant.phpdbg-method">PHPDBG_METHOD</a></code></strong>, <strong><code><a href="phpdbg.constants.php#constant.phpdbg-lineno">PHPDBG_LINENO</a></code></strong>
   および
   <strong><code><a href="phpdbg.constants.php#constant.phpdbg-func">PHPDBG_FUNC</a></code></strong> が削除されました。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.fpm">
  <h3 class="title">php-fpm</h3>

  <p class="para">
   <span class="function"><a href="function.getallheaders.php" class="function">getallheaders()</a></span>  関数も利用可能になりました。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.curl">
  <h3 class="title">CURL</h3>

  <p class="para">
   libcurl ≥ 7.15.5 が必須になりました。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.filter">
  <h3 class="title">データのフィルタリング</h3>

  <p class="para">
   <strong><code><a href="filter.constants.php#constant.filter-validate-float">FILTER_VALIDATE_FLOAT</a></code></strong> 定数が
   <code class="literal">thousand</code> オプションもサポートしました。
   これにより、受け入れ可能な千単位のセパレーター文字を指定できます。
   デフォルト (<code class="code">&quot;&#039;,.&quot;</code>)
   は、以前のPHPのバージョンと完全に互換性があります。
  </p>

  <p class="para">
   <code class="literal">magic_quotes</code> フィルタ
   (<strong><code><a href="filter.constants.php#constant.filter-sanitize-magic-quotes">FILTER_SANITIZE_MAGIC_QUOTES</a></code></strong>) のエイリアスとして
   <strong><code><a href="filter.constants.php#constant.filter-sanitize-add-slashes">FILTER_SANITIZE_ADD_SLASHES</a></code></strong> 
   が追加されました。
   <code class="literal">magic_quotes</code> フィルタは、将来のPHPで削除される予定です。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.ftp">
  <h3 class="title">FTP</h3>

  <p class="para">
   デフォルトの転送モードが <code class="literal">binary</code> になりました。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.intl">
  <h3 class="title">国際化関数</h3>

  <p class="para">
   PHP が ICU 56 以降とリンクされた場合、<strong><code>Normalizer::NONE</code></strong> は推奨されません。
  </p>

  <p class="para">
   <code class="literal">NFKC_Casefold</code> 正規化のために、
   <span class="methodname"><a href="normalizer.normalize.php" class="methodname">Normalizer::normalize()</a></span> メソッドの引数として
   <strong><code><a href="class.normalizer.php#normalizer.constants.form-kc-cf">normalizer::form_kc_cf</a></code></strong> が追加されました。
   これは、ICU 56 以降で利用可能です。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.json">
  <h3 class="title">JSON</h3>

  <p class="para">
   新しいフラグ <strong><code><a href="json.constants.php#constant.json-throw-on-error">JSON_THROW_ON_ERROR</a></code></strong> が追加されました。
   これは <span class="function"><a href="function.json-decode.php" class="function">json_decode()</a></span> や 
   <span class="function"><a href="function.json-encode.php" class="function">json_encode()</a></span> 関数で使うことができ、
   エラー時に <span class="classname"><a href="class.jsonexception.php" class="classname">JsonException</a></span>
   をスローできるようになります。
   これは、グローバルなエラー状態 <span class="function"><a href="function.json-last-error.php" class="function">json_last_error()</a></span> や
   <span class="function"><a href="function.json-last-error-msg.php" class="function">json_last_error_msg()</a></span> を取得する代わりに使えます。
   <strong><code><a href="json.constants.php#constant.json-partial-output-on-error">JSON_PARTIAL_OUTPUT_ON_ERROR</a></code></strong> は、
   <strong><code><a href="json.constants.php#constant.json-throw-on-error">JSON_THROW_ON_ERROR</a></code></strong> に優先します。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.mbstring">
  <h3 class="title">マルチバイト文字列</h3>

  <p class="para">
   configure オプション <strong class="option configure">--with-libmbfl</strong>
   は利用できなくなりました。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.uodbc">
  <h3 class="title">ODBC (Unified)</h3>

  <p class="para">
   <code class="literal">birdstep.max_links</code> ini ディレクティブを含む、
   <code class="literal">ODBCRouter</code> と <code class="literal">Birdstep</code>
   のサポートが削除されました。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.opcache">
  <h3 class="title">OPcache</h3>

  <p class="para">
   <code class="literal">opcache.inherited_hack</code> ini
   ディレクティブは削除されました。
   この値は、PHP 5.3.0 から既に無視されていました。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.openssl">
  <h3 class="title">OpenSSL</h3>

  <p class="para">
   ssl ストリームオプション
   <code class="literal">min_proto_version</code> および
   <code class="literal">max_proto_version</code> が
   指定可能な TLS プロトコルに関連する定数とともに追加されました。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.pcre">
  <h3 class="title">正規表現 (Perl互換)</h3>

  <p class="para">
   <a href="book.pcre.php" class="link">PCRE拡張</a>
   は PCRE2 にアップグレードされました。
   これによって振る舞いが少し変更される可能性があります (たとえば、
   クラス中の文字の範囲がより厳密に解釈されるなど) し、
   既に存在している正規表現の文法が増えるかもしれません。
  </p>

  <p class="para">
   <span class="function"><a href="function.preg-quote.php" class="function">preg_quote()</a></span> 関数は <code class="literal">&#039;#&#039;</code>
   もエスケープするようになりました。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.pdo-dblib">
  <h3 class="title">Microsoft SQL Server and Sybase Functions (PDO_DBLIB)</h3>

  <p class="para">
   空の行セットを自動的にスキップできるようにするために、
   <strong><code>PDO::DBLIB_ATTR_SKIP_EMPTY_ROWSETS</code></strong>
   属性が追加されました。
  </p>

  <p class="para">
   TDS バージョンを公開するための属性として、
   <strong><code>PDO::DBLIB_ATTR_TDS_VERSION</code></strong> が追加されました。
  </p>

  <p class="para">
    DATETIME2 型のカラムは、DATETIME型の絡むと同様に扱われるようになりました。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.pdo-sqlite">
  <h3 class="title">SQLite関数 (PDO_SQLITE)</h3>

  <p class="para">
   SQLite3 データベースは、
   新しい <strong><code>PDO::SQLITE_ATTR_OPEN_FLAGS</code></strong> 属性を
   <strong><code>PDO::SQLITE_OPEN_READONLY</code></strong> に設定することにより、
   読み取り専用としてオープンできるようになりました。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.session">
  <h3 class="title">セッションのハンドリング</h3>

  <p class="para">
   <span class="function"><a href="function.session-set-cookie-params.php" class="function">session_set_cookie_params()</a></span>
   関数は、以下のシグネチャもサポートしました:
   <div class="methodsynopsis dc-description">
    <span class="methodname"><a href="function.session-set-cookie-params.php" class="methodname">session_set_cookie_params</a></span>(<span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$options</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

   <code class="literal">$options</code> は、
   <code class="literal">&quot;lifetime&quot;</code>, <code class="literal">&quot;path&quot;</code>,
   <code class="literal">&quot;domain&quot;</code>, <code class="literal">&quot;secure&quot;</code>,
   <code class="literal">&quot;httponly&quot;</code> および <code class="literal">&quot;samesite&quot;</code>
   を指定可能な連想配列です。
   それに応じて、 <span class="function"><a href="function.session-get-cookie-params.php" class="function">session_get_cookie_params()</a></span>
   関数の戻り値にも <code class="literal">&quot;samesite&quot;</code> が含まれるようになりました。
   さらに、Cookie の SameSite ディレクティブのデフォルト値を設定するため、
   新しい <code class="literal">session.cookie_samesite</code> ini
   オプションが追加されました。この値のデフォルト値は 
   <code class="literal">&quot;&quot;</code> (空文字列) なので、SameSite
   ディレクティブは設定されません。
   この値には、<code class="literal">&quot;Lax&quot;</code> または <code class="literal">&quot;Strict&quot;</code>
   が設定でき、それぞれが SameSiteディレクティブに設定されます。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.tidy">
  <h3 class="title">Tidy</h3>

  <p class="para">
   <a href="https://github.com/petdance/tidyp" class="link external">&raquo;&nbsp;tidyp</a>
   抜きでビルドすることが透過的にサポートされました。tidyp
   はリリース日を取得するAPIを提供していないため、
   tidyp 抜きで PHP がビルドされた場合、
   <span class="function"><a href="tidy.getrelease.php" class="function">tidy_get_release()</a></span> や <span class="methodname"><a href="tidy.getrelease.php" class="methodname">tidy::getRelease()</a></span>
   は <code class="literal">&#039;unknown&#039;</code> を返します。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.xml">
  <h3 class="title">XMLパーサー</h3>

  <p class="para">
   拡張モジュールが libxml を使ってビルドされた場合には、
   <span class="function"><a href="function.xml-set-external-entity-ref-handler.php" class="function">xml_set_external_entity_ref_handler()</a></span>
   関数のコールバックの戻り値が無視されることはなくなりました。
   このバージョン以前はコールバックの戻り値が無視され、パースが止まりませんでした。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.zip">
  <h3 class="title">Zip</h3>

  <p class="para">
   PHP にバンドルされている libzip を使ってビルドすることは推奨されません。
   しかし、<strong class="option configure">--without-libzip</strong> を configure
   オプションに指定することにより、まだバンドルされた libzip を使ってビルド可能です。
  </p>
 </div>

 <div class="sect2" id="migration73.other-changes.zlib">
  <h3 class="title">Zlib による圧縮</h3>

  <p class="para">
   望ましい圧縮レベルの設定を楽にするために、<a href="wrappers.compression.php" class="link">compress.zlib ラッパー</a> の
   zlib/level コンテキストオプション が追加されました。
  </p>
 </div>

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