[PHP-doc 958] Re: マルチバイト文字列の一部で説明部分が実際と合わない
TAKAGI Masahiro
matakagi @ osk2.3web.ne.jp
2013年 1月 31日 (木) 06:17:39 JST
高木です。
先ほど対応を済ませました。
http://news.php.net/php.doc.cvs/10987
http://news.php.net/php.doc.ja/3689
2013/1/12 KOMURA Takaaki <komura.db2r1e @ gmail.com>:
> 1. mb_convert_case(): http://php.net/mb_convert_case
>
> mb_convert_case()の第2引数にデフォルト値が設定されていますが、第2引数は
> 省略不可なので、デフォルト値は意味がありません。
> 以下のように修正した方が良いのではないでしょうか。
>
> string mb_convert_case ( string $str , int $mode = MB_CASE_UPPER [, string $encoding = mb_internal_encoding() ] )
> ⇒ string mb_convert_case ( string $str , int $mode [, string $encoding = mb_internal_encoding() ] )
そのままいただきました。
>
> 2. mb_decode_numericentity(): http://php.net/mb_decode_numericentity
>
> mb_decode_numericentity()の第3引数はオプションです。また、PHP 5.4.0 からは、
> 第4引数が指定可能になりました。
>
> string mb_decode_numericentity ( string $str , array $convmap , string $encoding )
> ⇒ string mb_decode_numericentity ( string $str , array $convmap [, string $encoding [, bool $is_hex ]] )
手元で5.4と5.5のソースを見た限りでは、第4引数が追加されているのはmb_encode_numericentity()のほうだけに見えます。
なので、今回は第3引数の変更だけにとどめました。もし私が何か見落としているようでしたら、お手数ですがあらためてご指摘ください。
>
> 3. mb_encode_numericentity(): http://php.net/mb_encode_numericentity
>
> 2と同様に、mb_encode_numericentity()の第3引数はオプションです。
> また、PHP 5.4.0 からは、第4引数が指定可能になりました。
>
> string mb_encode_numericentity ( string $str , array $convmap , string $encoding )
> ⇒ string mb_encode_numericentity ( string $str , array $convmap [, string $encoding [, bool $is_hex ]] )
そのままいただきました。
> 4. mb_regex_set_options(): http://php.net/mb_regex_set_options
>
> マニュアルの返り値の説明に、引数が省略された場合、「現在のデフォルトの
> オプションを返します」とあります。引数のデフォルト値はない方が良いので
> はないでしょうか。
>
> string mb_regex_set_options ([ string $options = "msr" ] )
> ⇒ string mb_regex_set_options ([ string $options ] )
そのままいただきました。
あと、日本語訳の「現在の*デフォルトの*オプション…」は、誤訳ですね。
options を省略した場合は、
現在設定されているオプションを返します。
としておきました。
--
TAKAGI Masahiro mailto:matakagi @ osk2.3web.ne.jp
PHP-doc メーリングリストの案内