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

contributors($setup);

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

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

  <div class="sect3" id="migration83.other-changes.core.ffi">
   <h4 class="title">FFI</h4>

   <p class="para">
    <a href="opcache.configuration.php#ini.opcache.preload-user" class="link">opcache.preload_user</a> が現在のシステムユーザーに設定されている場合、事前ロードの間に <span class="methodname"><a href="ffi.load.php" class="methodname">FFI::load()</a></span> をコールできるようになりました。これより前のバージョンでは、<a href="opcache.configuration.php#ini.opcache.preload-user" class="link">opcache.preload_user</a> が設定されている場合は、事前ロードの間に <span class="methodname"><a href="ffi.load.php" class="methodname">FFI::load()</a></span> を呼び出せませんでした。
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.core.fpm">
   <h4 class="title">FPM</h4>

   <p class="para">
    ソケットのパスの長さが OS がサポートする長さ以上の場合、FPM CLI のテストが失敗するようになりました。
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.core.opcache">
   <h4 class="title">Opcache</h4>

   <p class="para">
    CLI SAPI と phpdbg SAPI では、<a href="opcache.configuration.php#ini.opcache.preload-user" class="link">opcache.preload_user</a> ディレクティブを設定しなくても root として事前ロードを実行できるようになりました。これら以外の SAPI では、root として事前ロードを実行する際に このディレクティブの設定が未だ必須です。なぜなら、SAPI が特権を持っていないユーザに移行する前に事前ロードが実行されるからです。
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.core.streams">
   <h4 class="title">Streams</h4>

   <p class="para">
    ソケット接続をブロックする <span class="function"><a href="function.fread.php" class="function">fread()</a></span> 関数は、バッファリングされているデータが存在した場合、追加のデータを待つのではなく、すぐに値を返すようになりました。
   </p>

   <p class="para">
    seek のオフセットが終端を超えた場合でも、memory ストリームは失敗しなくなりました。代わりに、次回書き込まれたときにメモリサイズが増加し、以前の終端からオフセットまでの間は、ファイルを扱っているときのようにゼロバイトで埋められます。
   </p>

   <p class="para">
    <span class="function"><a href="function.stat.php" class="function">stat()</a></span> のファイルアクセス操作が、<span class="function"><a href="function.file-exists.php" class="function">file_exists()</a></span> 類似の関数と同様に、ストリームのパスではなく、実在のパスを使うようになりました。これはストリームをオープンするときの振る舞いと一致します。
   </p>
  </div>
 </div>

 <div class="sect2" id="migration83.other-changes.sapi">
  <h3 class="title">SAPI モジュールへの変更</h3>

  <div class="sect3" id="migration83.other-changes.sapi.cli">
   <h4 class="title">CLI</h4>

   <p class="para">
    <strong><code><a href="reserved.constants.php#constant.stdout">STDOUT</a></code></strong>, <strong><code><a href="reserved.constants.php#constant.stderr">STDERR</a></code></strong>, <strong><code><a href="reserved.constants.php#constant.stdin">STDIN</a></code></strong> ストリームは、リソースが破棄される際にクローズされなくなりました。リソースが破棄されるタイミングでは CLI がほぼ終了しているからです。但し、<span class="function"><a href="function.fclose.php" class="function">fclose()</a></span> やその類似の関数を使い、これらのストリームを明示的に閉じることは未だできます。
   </p>
  </div>
 </div>

 <div class="sect2" id="migration83.other-changes.functions">
  <h3 class="title">変更された関数</h3>

  <div class="sect3" id="migration83.other-changes.functions.core">
   <h4 class="title">PHP コア</h4>

   <p class="para">
    <span class="function"><a href="function.gc-status.php" class="function">gc_status()</a></span> に、以下の8つのフィールドが追加されました:

    <ul class="simplelist">
     <li><code class="literal">&quot;running&quot;</code> => bool</li>
     <li><code class="literal">&quot;protected&quot;</code> => bool</li>
     <li><code class="literal">&quot;full&quot;</code> => bool</li>
     <li><code class="literal">&quot;buffer_size&quot;</code> => int</li>
     <li><code class="literal">&quot;application_time&quot;</code> => float: gc の合計の実行時間を秒単位で示します(collector_time を含みます)</li>
     <li><code class="literal">&quot;collector_time&quot;</code> => float: 循環参照を回収するのに使った時間を秒単位で示します(dessructor_time と free_time を含みます)</li>
     <li><code class="literal">&quot;destructor_time&quot;</code> => float: 循環参照を回収している間に、デストラクタを実行した時間を秒単位で示します</li>
     <li><code class="literal">&quot;free_time&quot;</code> => float: 循環参照を回収している間に、メモリを開放するのにかかった時間を秒単位で示します</li>
    </ul>
   </p>

   <p class="para">
    <span class="function"><a href="function.class-alias.php" class="function">class_alias()</a></span> は、内部クラスのエイリアスを作成する操作もサポートしました。
   </p>

   <p class="para">
    <code class="code">ini_set(&#039;open_basedir&#039;, ...);</code> を実行して実行時に <a href="ini.core.php#ini.open-basedir" class="link">open_basedir</a> を設定する場合、親ディレクトリ (<code class="literal">..</code>) を含んだパスを受け入れなくなりました。これより前のバージョンでは、<code class="literal">..</code> で始まるパスだけを拒否していました。<code class="literal">..</code> で始まるパスのみを拒否する制限は、パスの先頭に <code class="literal">./</code> を付加することで簡単に回避できてしまっていました。
   </p>

   <p class="para">
    ユーザー定義の例外ハンドラは、シャットダウン時の例外もキャッチするようになりました。
   </p>

   <p class="para">
    <span class="function"><a href="function.highlight-string.php" class="function">highlight_string()</a></span> と <span class="function"><a href="function.highlight-file.php" class="function">highlight_file()</a></span> の結果として出力されるHTMLが、変更されました。外側のHTMLタグの間にあるホワイトスペースは削除されます。改行とスペースはHTMLエンティティに変換されなくなりました。HTML全体を <code class="literal">&lt;pre&gt;</code> タグで囲むようになっています。外側の <code class="literal">&lt;span&gt;</code> タグは <code class="literal">&lt;code&gt;</code> タグに統合されました。
   </p>

  </div>

  <div class="sect3" id="migration83.other-changes.functions.calendar">
   <h4 class="title">Calendar</h4>

   <p class="para">
    <span class="function"><a href="function.easter-date.php" class="function">easter_date()</a></span> は、64ビットシステム上で 1970 から 2,000,000,000 までの年の値をサポートしました。これより前のバージョンでは、1970 から 2037 までの年の値だけをサポートしていました。
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.functions.curl">
   <h4 class="title">Curl</h4>

   <p class="para">
    <span class="function"><a href="function.curl-getinfo.php" class="function">curl_getinfo()</a></span> は、新しく2つの定数をサポートしました: <strong><code><a href="curl.constants.php#constant.curlinfo-capath">CURLINFO_CAPATH</a></code></strong> と <strong><code><a href="curl.constants.php#constant.curlinfo-cainfo">CURLINFO_CAINFO</a></code></strong> です。$option が <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> の場合、以下の追加のキーが含まれるようになります: <code class="literal">&quot;capath&quot;</code>, <code class="literal">&quot;cainfo&quot;</code>
   </p>
  </div>

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

   <p class="para">
    <span class="methodname"><a href="domcharacterdata.appenddata.php" class="methodname">DOMCharacterData::appendData()</a></span> の仮の戻り値の型が、<span class="type"><a href="language.types.singleton.php" class="type true">true</a></span> に変更されました。
   </p>

   <p class="para">
    <span class="methodname"><a href="domdocument.loadhtml.php" class="methodname">DOMDocument::loadHTML()</a></span>, <span class="methodname"><a href="domdocument.loadhtmlfile.php" class="methodname">DOMDocument::loadHTMLFile()</a></span>, <span class="methodname"><a href="domdocument.loadxml.php" class="methodname">DOMDocument::loadXML()</a></span> の仮の戻り値の型が、<span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> になりました。これより前のバージョンでは、<code class="code">DOMDocument|bool</code> を返すとドキュメントに記されていましたが、PHP 8.0 以降は static にコールできなかったため、 <span class="classname"><a href="class.domdocument.php" class="classname">DOMDocument</a></span> が返せていませんでした。
   </p>

  </div>

  <div class="sect3" id="migration83.other-changes.functions.gd">
   <h4 class="title">Gd</h4>

   <p class="para">
    <span class="function"><a href="function.imagerotate.php" class="function">imagerotate()</a></span> 関数のシグネチャが変更され、<code class="parameter">$ignore_transparent</code> パラメータが削除されました。このパラメータは PHP 5.5.0 以降、無視されていたためです。
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.functions.intl">
   <h4 class="title">国際化関数</h4>

   <p class="para">
    <span class="function"><a href="intldateformatter.settimezone.php" class="function">datefmt_set_timezone()</a></span> (とそのエイリアス <span class="methodname"><a href="intldateformatter.settimezone.php" class="methodname">IntlDateformatter::setTimeZone()</a></span>) は、成功時に <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> を返すようになりました。これより前のバージョンでは、<strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> を返していました。
   </p>

   <p class="para">
    <span class="methodname"><a href="intlbreakiterator.settext.php" class="methodname">IntlBreakiterator::setText()</a></span> は、失敗時に <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返すようになりました。これより前のバージョンでは、<strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> を返していました。 また、成功時に <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> を返すようになりました。これより前のバージョンでは、<strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> を返していました。
   </p>

   <p class="para">
    <span class="methodname"><a href="intlchar.enumcharnames.php" class="methodname">IntlChar::enumCharNames()</a></span> は、戻り値として boolean を返すようになりました。これより前のバージョンでは、成功時に <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>、失敗時に <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返していました。
   </p>

   <p class="para">
    <span class="methodname"><a href="intldateformatter.create.php" class="methodname">IntlDateFormatter::__construct()</a></span> は、無効なロケールを設定した場合に <strong><code><a href="intl.constants.php#constant.u-illegal-argument-error">U_ILLEGAL_ARGUMENT_ERROR</a></code></strong> 例外をスローするようになりました。
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.functions.mbstring">
   <h4 class="title">マルチバイト文字列</h4>

   <p class="para">
    <span class="function"><a href="function.mb-strtolower.php" class="function">mb_strtolower()</a></span> と <span class="function"><a href="function.mb-convert-case.php" class="function">mb_convert_case()</a></span> は、ギリシャ文字シグマの条件付きケース変換規則を実装しました。<span class="function"><a href="function.mb-convert-case.php" class="function">mb_convert_case()</a></span> では、条件付きケース変換は <strong><code><a href="mbstring.constants.php#constant.mb-case-lower">MB_CASE_LOWER</a></code></strong> と <strong><code><a href="mbstring.constants.php#constant.mb-case-title">MB_CASE_TITLE</a></code></strong> モードにのみ適用され、<strong><code><a href="mbstring.constants.php#constant.mb-case-lower-simple">MB_CASE_LOWER_SIMPLE</a></code></strong> と <strong><code><a href="mbstring.constants.php#constant.mb-case-title-simple">MB_CASE_TITLE_SIMPLE</a></code></strong> には適用されません。
   </p>

   <p class="para">
    <span class="function"><a href="function.mb-decode-mimeheader.php" class="function">mb_decode_mimeheader()</a></span>  は、RFC 2047 で要求された通りに、Qprint でエンコードされた単語のアンダースコアを解釈するようになりました。つまり、それらはスペースに変換されます。このようにMIMEエンコードされた単語では、アンダースコアは <code class="literal">&quot;=5F&quot;</code> としてエンコードしなければいけません。
   </p>

   <p class="para">
    <span class="function"><a href="function.mb-encode-mimeheader.php" class="function">mb_encode_mimeheader()</a></span> の実装が変更され、レアケースではあるものの、PHP 8.2 で生の ASCII として渡されていた入力文字列が、transfer_encoding の値でエンコードされる場合があります。
   </p>

   <p class="para">
    <span class="function"><a href="function.mb-encode-mimeheader.php" class="function">mb_encode_mimeheader()</a></span> は、入力文字列が Qprint エンコーディングの場合に、NUL(ゼロ)バイトを削除しなくなりました。これより前のバージョンでは、あるテキストエンコーディングの場合(特に UTF-16 と UTF-32) に NUL バイトが削除され、mb_encode_mimeheader の結果が壊れる場合がありました。
   </p>

   <p class="para">
    <span class="function"><a href="function.mb-detect-encoding.php" class="function">mb_detect_encoding()</a></span> の &quot;$strict に true を指定しない&quot; モードが、ドキュメントの通りに振る舞うようになりました。これより前のバージョンでは、入力文字列と同一のバイト(たとえば、最初のバイト) が、候補となるエンコーディングのリスト全てに対して不正と判定された場合でも、<strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返していました。もっと一般化すると、不正なバイトが見つかった時点で、候補となるエンコーディングから削除してしまっていました。そして、入力と同一のバイトを削除した場合に、残りのエンコーディングをすべて候補として考慮すべき場合でも、<strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返していました。一方で、候補となるエンコーディングが削除されて残りがひとつだけになった場合、文字列中で後にどれくらいエンコーディングのエラーが見つかるのかを考慮することなく、その残ったエンコーディングを返していました。この振る舞いは、ドキュメントの以下の説明と一致しません: &quot;strict が false の場合、 もっとも近いと判定された文字エンコーディングが返されます&quot;
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.functions.mysqli">
   <h4 class="title">mysqli</h4>

   <p class="para">
    <span class="function"><a href="mysqli-result.fetch-object.php" class="function">mysqli_fetch_object()</a></span> は、<code class="parameter">$constructor_args</code> が空でないのに、クラスにコンストラクタが存在しない場合、 <span class="classname"><a href="class.exception.php" class="classname">Exception</a></span> ではなく <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> を発生させるようになりました。
   </p>

   <p class="para">
    <span class="function"><a href="mysqli.poll.php" class="function">mysqli_poll()</a></span> は、<code class="parameter">$read</code> と <code class="parameter">$error</code> が両方渡されない場合、<span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> を発生させるようになりました。
   </p>

   <p class="para">
    <span class="function"><a href="mysqli-result.field-seek.php" class="function">mysqli_field_seek()</a></span> と <span class="methodname"><a href="mysqli-result.field-seek.php" class="methodname">mysqli_result::field_seek()</a></span> の戻り値の型が、<span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> ではなく <span class="type"><a href="language.types.singleton.php" class="type true">true</a></span> に変更されました。
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.functions.odbc">
   <h4 class="title">ODBC</h4>

   <p class="para">
    <span class="function"><a href="function.odbc-autocommit.php" class="function">odbc_autocommit()</a></span>は、<code class="parameter">$enable</code> パラメータで <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> を受け入れるようになりました。<strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> を渡すと、パラメータをひとつ渡した場合と同じ振る舞いをします。つまり、自動コミットが有効かどうかだけを示す動きをします。
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.functions.pgsql">
   <h4 class="title">PostgreSQL</h4>

   <p class="para">
    <span class="function"><a href="function.pg-fetch-object.php" class="function">pg_fetch_object()</a></span> は、<code class="parameter">$constructor_args</code> が空でないのに、クラスにコンストラクタが存在しない場合、<span class="classname"><a href="class.exception.php" class="classname">Exception</a></span> ではなく <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> を発生させるようになりました。
   </p>

   <p class="para">
    <span class="function"><a href="function.pg-insert.php" class="function">pg_insert()</a></span> は、指定されたテーブルが無効な場合に、<strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> ではなく <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> を発生させるようになりました。
   </p>

   <p class="para">
    <span class="function"><a href="function.pg-insert.php" class="function">pg_insert()</a></span> と <span class="function"><a href="function.pg-convert.php" class="function">pg_convert()</a></span> は、フィールドの値/タイプ が PostgreSQL の型と一致しない場合に、<strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> ではなく <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> または <span class="classname"><a href="class.typeerror.php" class="classname">TypeError</a></span> を発生させるようになりました。
   </p>

   <p class="para">
    <span class="function"><a href="function.pg-fetch-result.php" class="function">pg_fetch_result()</a></span>, <span class="function"><a href="function.pg-field-prtlen.php" class="function">pg_field_prtlen()</a></span>, <span class="function"><a href="function.pg-field-is-null.php" class="function">pg_field_is_null()</a></span> のパラメータ <code class="parameter">$row</code> は、nullable になりました。
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.functions.random">
   <h4 class="title">Random</h4>

   <p class="para">
    <span class="function"><a href="function.mt-srand.php" class="function">mt_srand()</a></span> と <span class="function"><a href="function.srand.php" class="function">srand()</a></span> は、ランダムなシードを使うかを決めるために、引数の数をチェックしなくなりました。<strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> を渡すとランダムなシードを生成します。<code class="literal">0</code> を渡すとゼロをシードとして使います。これらの関数の振る舞いは、<span class="methodname"><a href="random-engine-mt19937.construct.php" class="methodname">Random\Engine\Mt19937::__construct()</a></span> と一貫したものになりました。
   </p>

  </div>

  <div class="sect3" id="migration83.other-changes.functions.reflection">
   <h4 class="title">リフレクション</h4>

   <p class="para">
    <span class="methodname"><a href="reflectionclass.getstaticproperties.php" class="methodname">ReflectionClass::getStaticProperties()</a></span> の戻り値の型は、nullable ではなくなりました。
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.functions.standard">
   <h4 class="title">標準ライブラリ</h4>

   <p class="para">
    <span class="function"><a href="function.unserialize.php" class="function">unserialize()</a></span> で発生していた <strong><code><a href="errorfunc.constants.php#constant.e-notice">E_NOTICE</a></code></strong> は、<strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> に変更されました。
    
   </p>

   <p class="para">
    処理されていない入力が残っている場合に、<span class="function"><a href="function.unserialize.php" class="function">unserialize()</a></span> は新たに <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> を発生させるようになりました。
    
   </p>

   <p class="para">
    <span class="function"><a href="function.array-pad.php" class="function">array_pad()</a></span> は、配列が持つことができる最大の要素数だけを制限するようになりました。これより前のバージョンでは、一度に追加できる最大の要素数が 1048576 になっていました。
   </p>

   <p class="para">
    <span class="function"><a href="function.strtok.php" class="function">strtok()</a></span> は、トークンの分割を開始した際にトークンが与えられていない場合、<strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> を発生させるようになりました。
   </p>

   <p class="para">
    <span class="function"><a href="function.password-hash.php" class="function">password_hash()</a></span> は、ソルトの生成が失敗した場合に、<span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> の <code class="parameter">$previous</code> (直前にスローされた例外) として、既に存在する <span class="classname"><a href="class.random-randomexception.php" class="classname">Random\RandomException</a></span> をチェインさせるようになりました。
   </p>

   <p class="para">
    <span class="function"><a href="function.proc-open.php" class="function">proc_open()</a></span> の <code class="parameter">$command</code> に配列を指定する場合、空でない要素を少なくともひとつ含んでいることが必須になりました。そうでない場合、<span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> がスローされます。
   </p>

   <p class="para">
    <span class="function"><a href="function.proc-open.php" class="function">proc_open()</a></span> の <code class="parameter">$command</code> に配列を指定する場合、かつそれが不正なコマンドの場合に、後に警告が発生するリソースではなく <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返すようになりました。Windows では既にそのように動作していましたが、posix_spawn を使っている場合(ほとんどのプラットフォーム Linux, BSD, MacOS) でも同様の振る舞いをするようになりました。ただ、posix_spawn をサポートしていないために、以前の振る舞いが変更されていない古いプラットフォームもまだ残っています。
   </p>

   <p class="para">
    <span class="function"><a href="function.array-sum.php" class="function">array_sum()</a></span> と <span class="function"><a href="function.array-product.php" class="function">array_product()</a></span> は、配列に含まれる値が int/float に変換できない場合、警告を発生させるようになりました。これより前のバージョンでは、配列とオブジェクトは無視され、それら以外の値は int にキャストされていました。さらに、数値へのキャストを定義しているオブジェクト (例: <a href="book.gmp.php" class="link">GMP</a>) は、無視されるのではなく、数値に変換されるようになっています。
    
   </p>

   <p class="para">
    <span class="function"><a href="function.number-format.php" class="function">number_format()</a></span> の <code class="parameter">$decimals</code> パラメータは、負の整数値の四捨五入も扱うようになりました。つまり、<code class="parameter">$decimals</code> が負の値の場合、<code class="parameter">$num</code> は 小数点前の有効桁数 <code class="parameter">$decimals</code> 桁に丸められます。これより前のバージョンでは、負の <code class="parameter">$decimals</code> を指定しても、黙って無視され、数値は小数点以下が0桁になるように丸められていました。
   </p>

   <p class="para">
    <span class="function"><a href="function.strrchr.php" class="function">strrchr()</a></span> に <code class="parameter">$before_needle</code> が追加されました。これは <span class="function"><a href="function.strstr.php" class="function">strstr()</a></span> や <span class="function"><a href="function.stristr.php" class="function">stristr()</a></span> の対応するパラメータと、似た振る舞いをします。
   </p>

   <p class="para">
    <span class="function"><a href="function.str-getcsv.php" class="function">str_getcsv()</a></span> と <span class="function"><a href="function.fgetcsv.php" class="function">fgetcsv()</a></span> は、最後のフィールドに終端されていないクォートだけが含まれている場合、null バイトの文字列をひとつ返すのではなく、空文字列を返すようになりました。
   </p>
  </div>

 </div>

 <div class="sect2" id="migration83.other-changes.extensions">
  <h3 class="title">拡張モジュールへのその他の変更</h3>

  <div class="sect3" id="migration83.other-changes.extensions.core">
   <h4 class="title">PHP コア</h4>

   <p class="para">
    <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> 型の値に対して、<a href="language.operators.increment.php" class="link">加算子/減算子</a> (<code class="literal">++</code>/<code class="literal">--</code>) を使うと、警告が発生するようになりました。現状、この操作にはなんの意味もありませんが、将来的に <code class="code">$bool += 1</code> のような振る舞いをするようになるからです。
   </p>

   <p class="para">
    <span class="type"><a href="language.types.null.php" class="type null">null</a></span> 型の値に対して、<a href="language.operators.increment.php" class="link">減算子</a> (<code class="literal">--</code>) を使うと、警告が発生するようになりました。現状、この操作にはなんの意味もありませんが、将来的に <code class="code">$null -= 1</code> のような振る舞いをするようになるからです。
   </p>

   <p class="para">
    内部オブジェクトで、_IS_NUMBER キャストを実装しているものの、加算と減算の振る舞いを上書きする do_operator ハンドラを実装していない場合があります。この場合でも、<code class="code">$o += 1</code> や <code class="code">$o -= 1</code> をあたかも実行したかのように、値をインクリメント / デクリメントできるようになりました。
   </p>
  </div>

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

   <p class="para">
    DOM の寿命を管理する仕組みが書き直され、暗黙のうちに削除されていたノードが取得できるようになりました。これより前のバージョンでは、削除されていたノードを取得しようとすると例外が発生していました。
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.extensions.sqlite3">
   <h4 class="title">SQLite3</h4>

   <p class="para">
    <span class="classname"><a href="class.sqlite3.php" class="classname">SQLite3</a></span> クラスは、<span class="classname"><a href="class.exception.php" class="classname">Exception</a></span> ではなく、(<span class="classname"><a href="class.exception.php" class="classname">Exception</a></span> を継承した) <span class="classname"><a href="class.sqlite3exception.php" class="classname">SQLite3Exception</a></span> をスローするようになりました。
   </p>

   <p class="para">
    SQLite のエラーコードは、エラーメッセージに含められるのではなく、例外に渡されるようになりました。
   </p>

  </div>
 </div>

 <div class="sect2" id="migration83.other-changes.ini">
  <h3 class="title">INI ファイルの扱いの変更</h3>

  <ul class="itemizedlist">
   <li class="listitem">
    <p class="para">
     <code class="literal">assert.*</code> INI 設定は、推奨されなくなりました。
     以下の INI 設定が該当します:
     <ul class="simplelist">
      <li><a href="info.configuration.php#ini.assert.active" class="link">assert.active</a></li>
      <li><a href="info.configuration.php#ini.assert.bail" class="link">assert.bail</a></li>
      <li><a href="info.configuration.php#ini.assert.callback" class="link">assert.callback</a></li>
      <li><a href="info.configuration.php#ini.assert.exception" class="link">assert.exception</a></li>
      <li><a href="info.configuration.php#ini.assert.warning" class="link">assert.warning</a></li>
     </ul>
     これらの設定値がデフォルト値の場合、推奨されない警告は発生しません。<a href="ini.core.php#ini.zend.assertions" class="link">zend.assertions</a> を代わりに使うべきです。
    </p>
   </li>
   <li class="listitem">
    <p class="para">
     <a href="info.configuration.php#ini.zend.max-allowed-stack-size" class="link">zend.max_allowed_stack_size</a> は、許可される最大のスタックサイズの値を設定するための、新しい INI ディレクティブです。設定できる値は、<code class="literal">0</code> (プロセスやスレッドの、スタックサイズの最大値を用います)、<code class="literal">-1</code> (無制限)、そしてバイト単位の正の数値です。デフォルトは <code class="literal">0</code> です。プロセスやスレッドのスタックサイズの最大値がわからない場合、既知のシステムのデフォルト値を使います。この値に大き過ぎる値を設定すると、スタックサイズの制限を無効にすることと同じ効果があります。ファイバーは 許可される最大のスタックサイズとして <a href="info.configuration.php#ini.fiber.stack-size" class="link">fiber.stack_size</a> の値を使います。プロセスのコールスタックが <a href="info.configuration.php#ini.zend.max-allowed-stack-size" class="link">zend.max_allowed_stack_size</a>-<a href="info.configuration.php#ini.zend.reserved-stack-size" class="link">zend.reserved_stack_size</a> バイトを超えると、スタックオーバーフローが引き起こすセグメンテーションフォルトを防ぐため、<span class="classname"><a href="class.error.php" class="classname">Error</a></span> がスローされます。これは、デバッグを容易にすることが目的です。スタックサイズは、制御されていない再帰処理によって増加します。増加する範囲は、内部関数やマジックメソッド <a href="language.oop5.magic.php#object.tostring" class="link">__toString()</a>, <a href="language.oop5.cloning.php#object.clone" class="link">__clone()</a>, <a href="language.oop5.magic.php#object.sleep" class="link">__sleep()</a>, <a href="language.oop5.decon.php#object.destruct" class="link">__destruct()</a> 内も含みます。この機能はスタックバッファのオーバーフローとは無関係ですし、セキュリティのための機能でもありません。
    </p>
   </li>
   <li class="listitem">
    <p class="para">
      <a href="info.configuration.php#ini.zend.reserved-stack-size" class="link">zend.reserved_stack_size</a> は、予約済みのスタックサイズをバイト単位で設定するための、新しい INI ディレクティブです。許可されたスタックサイズの最大値から、この値がバッファとして引かれ、スタックサイズがチェックされます。
    </p>
   </li>
   </ul>
 </div>

 <div class="sect2" id="migration83.other-changes.performance">
  <h3 class="title">パフォーマンスに関わる変更</h3>

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

   <p class="para">
    <span class="classname"><a href="class.domnodelist.php" class="classname">DOMNodeList</a></span> をループさせた場合、キャッシュを使うようになりました。よって、ノードをリクエストする処理に、デフォルトで O(n^2) 時間かかることはなくなりました。
   </p>

   <p class="para">
    ノードからテキストを取得する際に、メモリを確保する処理を避けるようになりました。この結果、パフォーマンスが向上しています。
   </p>

   <p class="para">
    <span class="methodname"><a href="domchildnode.remove.php" class="methodname">DOMChildNode::remove()</a></span> は、計算量が O(1) で実行されるようになりました。
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.performance.standard">
   <h4 class="title">標準ライブラリ</h4>

   <p class="para">
    <span class="function"><a href="function.file.php" class="function">file()</a></span> 関数の flags パラメータのエラーチェックは、約7% 高速になりました。
   </p>
  </div>

  <div class="sect3" id="migration83.other-changes.performance.spl">
   <h4 class="title">Standard PHP Library(SPL)</h4>

   <p class="para">
    <span class="classname"><a href="class.recursivedirectoryiterator.php" class="classname">RecursiveDirectoryIterator</a></span> を使ってディレクトリをループする場合の、I/O が削減されました。
   </p>
  </div>
 </div>

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