diff --git a/language-snippets.ent b/language-snippets.ent index 8d19984b73c..e21b26bca75 100644 --- a/language-snippets.ent +++ b/language-snippets.ent @@ -1,6 +1,6 @@ - + @@ -508,6 +508,8 @@ PHP では、https:// ラッパーでストリームをオー 上の例の PHP 7.1 での出力は、このようになります。'> +上の例の PHP 7.2 での出力は、このようになります。'> + 上の例の PHP 7.3 での出力は、このようになります。'> 上の例の PHP 8 での出力は、このようになります。:'> diff --git a/reference/array/functions/count.xml b/reference/array/functions/count.xml index 202d7660d68..cc2d77f7efb 100644 --- a/reference/array/functions/count.xml +++ b/reference/array/functions/count.xml @@ -1,6 +1,6 @@ - + @@ -88,6 +88,28 @@ $a[1] = 3; $a[2] = 5; var_dump(count($a)); +$b[0] = 7; +$b[5] = 9; +$b[10] = 11; +var_dump(count($b)); +?> +]]> + + &example.outputs; + + + + + + + + Countable|array でない値を渡した場合の <function>count</function> の例 (悪い例です - 真似しないでね!) + + + + &example.outputs.72; + + + + &example.outputs.8; + + @@ -135,7 +172,6 @@ echo count($food); // output 2 - &reftitle.changelog; @@ -147,6 +183,14 @@ echo count($food); // output 2 + + 8.0.0 + + value + 引数に不正な countable 型を渡した場合に、 + TypeError をスローするようになりました。 + + 7.2.0