diff --git a/reference/spl/recursiveiteratoriterator.xml b/reference/spl/recursiveiteratoriterator.xml index 1a3ac6a8bc..3f1ad1a5fe 100644 --- a/reference/spl/recursiveiteratoriterator.xml +++ b/reference/spl/recursiveiteratoriterator.xml @@ -1,6 +1,6 @@ - + RecursiveIteratorIterator クラス @@ -14,6 +14,12 @@ 再帰的なイテレータの反復処理に使用します。 + + RecursiveIteratorIterator に存在しないメソッドの呼び出しは、 + RecursiveIteratorIterator::getSubIterator が返す、 + 現在の深さのイテレータに転送されます。 + この転送に __call() は使われません。 + diff --git a/reference/spl/recursiveiteratoriterator/beginchildren.xml b/reference/spl/recursiveiteratoriterator/beginchildren.xml index b04f0bf4bf..7dcf64c0af 100644 --- a/reference/spl/recursiveiteratoriterator/beginchildren.xml +++ b/reference/spl/recursiveiteratoriterator/beginchildren.xml @@ -1,6 +1,6 @@ - + RecursiveIteratorIterator::beginChildren @@ -13,11 +13,11 @@ public voidRecursiveIteratorIterator::beginChildren - - RecursiveIteratorIterator::getChildren と、それに関連する + + RecursiveIteratorIterator::callGetChildren と、それに関連する RecursiveIteratorIterator::rewind をコールした後でコールされます。 - + &warn.undocumented.func; diff --git a/reference/spl/recursiveiteratoriterator/construct.xml b/reference/spl/recursiveiteratoriterator/construct.xml index 80de2f3199..6028e9b0b2 100644 --- a/reference/spl/recursiveiteratoriterator/construct.xml +++ b/reference/spl/recursiveiteratoriterator/construct.xml @@ -1,6 +1,6 @@ - + RecursiveIteratorIterator::__construct @@ -58,10 +58,10 @@ flags - + オプションのフラグ。指定できる値は RecursiveIteratorIterator::CATCH_GET_CHILD - で、RecursiveIteratorIterator::getChildren のコール時にスローされた例外を無視します。 - + で、RecursiveIteratorIterator::callGetChildren のコール時にスローされた例外を無視します。 + diff --git a/reference/spl/splfixedarray.xml b/reference/spl/splfixedarray.xml index 55eb4231c0..a56038d41f 100644 --- a/reference/spl/splfixedarray.xml +++ b/reference/spl/splfixedarray.xml @@ -1,6 +1,6 @@ - + SplFixedArray クラス SplFixedArray @@ -85,6 +85,14 @@ が、SplFixedArray に追加されました。 + + 8.1.0 + + SplFixedArray で整数でないキーを使うと、 + RuntimeException ではなく + TypeError がスローされるようになりました。 + + 8.1.0 @@ -136,23 +144,25 @@ $array[9] = "asdf"; // 配列のサイズを 2 に縮めます $array->setSize(2); -// 以下は RuntimeException: Index invalid or out of range となります +// 以下の 2 つのブロックでは RuntimeException: Index invalid or out of range がスローされます try { - var_dump($array["non-numeric"]); -} catch(RuntimeException $re) { - echo "RuntimeException: ".$re->getMessage()."\n"; + var_dump($array[-1]); +} catch(RuntimeException $e) { + echo "RuntimeException: ".$e->getMessage()."\n"; } try { - var_dump($array[-1]); -} catch(RuntimeException $re) { - echo "RuntimeException: ".$re->getMessage()."\n"; + var_dump($array[5]); +} catch(RuntimeException $e) { + echo "RuntimeException: ".$e->getMessage()."\n"; } +// PHP 8.1.0 以降では、整数でないキーを使うと TypeError がスローされます。 +// PHP 8.1.0 より前のバージョンでは、RuntimeException がスローされていました。 try { - var_dump($array[5]); -} catch(RuntimeException $re) { - echo "RuntimeException: ".$re->getMessage()."\n"; + var_dump($array["non-numeric"]); +} catch(TypeError $e) { + echo "TypeError: ".$e->getMessage()."\n"; } ?> ]]> @@ -165,11 +175,18 @@ int(2) string(3) "foo" RuntimeException: Index invalid or out of range RuntimeException: Index invalid or out of range -RuntimeException: Index invalid or out of range +TypeError: Illegal offset type ]]> + + + PHP 8.1.0 より前のバージョンでは、整数でないキーで SplFixedArray + にアクセスすると、TypeError ではなく + RuntimeException がスローされていました。 + + diff --git a/reference/spl/splpriorityqueue/getextractflags.xml b/reference/spl/splpriorityqueue/getextractflags.xml index 38e2202522..60d598cc11 100644 --- a/reference/spl/splpriorityqueue/getextractflags.xml +++ b/reference/spl/splpriorityqueue/getextractflags.xml @@ -1,6 +1,6 @@ - + SplPriorityQueue::getExtractFlags @@ -13,11 +13,12 @@ public intSplPriorityQueue::getExtractFlags - - - - - &warn.undocumented.func; + + SplPriorityQueue::current、 + SplPriorityQueue::top、 + SplPriorityQueue::extract + が何を取り出すのかを指定するフラグを取得します。 + @@ -28,11 +29,28 @@ &reftitle.returnvalues; - - 展開時のフラグを返します。 - + + 取り出す際のフラグを返します。次のいずれかです: + + + SplPriorityQueue::EXTR_DATA (0x00000001): データを取り出す + SplPriorityQueue::EXTR_PRIORITY (0x00000002): 優先順位を取り出す + SplPriorityQueue::EXTR_BOTH (0x00000003): 両方を含む配列を取り出す + + + デフォルトは SplPriorityQueue::EXTR_DATA です。 + + + &reftitle.seealso; + + SplPriorityQueue::setExtractFlags + SplPriorityQueue::current + SplPriorityQueue::top + SplPriorityQueue::extract + + - + SplPriorityQueue::setExtractFlags @@ -48,6 +48,16 @@ + + &reftitle.seealso; + + SplPriorityQueue::getExtractFlags + SplPriorityQueue::current + SplPriorityQueue::top + SplPriorityQueue::extract + + +