cvs: phpdoc-ja /reference/array/functions array-diff-key.xml array-diff-uassoc.xml array-diff-ukey.xml array-intersect-key.xml
array-intersect-uassoc.xml array-intersect-ukey.xml array-product.xml array-udiff-assoc.xml array-udiff-uassoc.xml array-udiff.xml
array-uintersect-assoc.xml array-uintersect-uassoc.xml array-uintersect.xml array-walk-recursive.xml
| From: | TAKAGI Masahiro | Date: | Sun, 07 Aug 2005 06:33:15 +0000 |
| Subject: | cvs: phpdoc-ja /reference/array/functions array-diff-key.xml array-diff-uassoc.xml array-diff-ukey.xml array-intersect-key.xml array-intersect-uassoc.xml array-intersect-ukey.xml array-product.xml array-udiff-assoc.xml array-udiff-uassoc.xml array-udiff.xml array-uintersect-assoc.xml array-uintersect-uassoc.xml array-uintersect.xml array-walk-recursive.xml |
||
| Groups: | php.doc.ja | ||
| Request: | Send a blank email to doc-ja+get-1110@lists.php.net to get a copy of this message | ||
takagi Sun Aug 7 02:33:15 2005 EDT
Added files:
/phpdoc-ja/reference/array/functions array-walk-recursive.xml
array-uintersect.xml
array-uintersect-uassoc.xml
array-uintersect-assoc.xml
array-udiff.xml
array-udiff-uassoc.xml
array-udiff-assoc.xml
array-product.xml
array-intersect-ukey.xml
array-intersect-uassoc.xml
array-intersect-key.xml
array-diff-ukey.xml
array-diff-uassoc.xml
array-diff-key.xml
Log:
added japanese manual.
http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-walk-recursive.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-walk-recursive.xml +++ phpdoc-ja/reference/array/functions/array-walk-recursive.xml <?xml version='1.0' encoding='utf-8'?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.8 Maintainer: takagi Status: ready --> <refentry id="function.array-walk-recursive"> <refnamediv> <refname>array_walk_recursive</refname> <refpurpose> é åã®å ¨ã¦ã®è¦ç´ ã«ãã¦ã¼ã¶ã¼é¢æ°ãå帰çã«é©ç¨ãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>bool</type><methodname>array_walk_recursive</methodname> <methodparam><type>array</type><parameter role="reference">input</parameter></methodparam> <methodparam><type>callback</type><parameter>funcname</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>userdata</parameter></methodparam> </methodsynopsis> <simpara> <parameter>input</parameter> é åã®åè¦ç´ ã«ã¦ã¼ã¶å®ç¾©é¢æ° <parameter>funcname</parameter>ãé©ç¨ãã¾ãã ãã®é¢æ°ã¯é åã®è¦ç´ å ãå帰çã«ãã©ã£ã¦ããã¾ããé常ã <parameter>funcname</parameter> ã¯å¼æ°ãäºã¤ã¨ãã¾ãã <parameter>input</parameter> ãã©ã¡ã¼ã¿ã®å¤ãæåã®å¼æ°ã ãã¼/æ·»åã¯äºçªç®ã®å¼æ°ã¨ãªãã¾ãã ãªãã·ã§ã³ã® <parameter>userdata</parameter> ãã©ã¡ã¼ã¿ãæå®ãããå ´åã ã³ã¼ã«ããã¯é¢æ° <parameter>funcname</parameter> ã¸ã®ä¸çªç®ã®å¼æ°ã¨ã㦠渡ããã¾ãã </simpara> <simpara> &return.success; </simpara> <note> <para> <parameter>funcname</parameter> ã«ããé åã®å¤ãã®ãã®ã夿´ããå¿ è¦ã ããå ´åã<parameter>funcname</parameter> ã®æåã®å¼æ°ã¯ <link linkend="language.references">åç §</link>ã¨ã㦠渡ãå¿ è¦ãããã¾ãããã®å ´åãé åã®è¦ç´ ã«å ãã夿´ã¯ã é åèªä½ã«å¯¾ãã¦è¡ããã¾ãã </para> </note> <para> <example> <title><function>array_walk_recursive</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $sweet = array('a' => 'apple', 'b' => 'banana'); $fruits = array('sweet' => $sweet, 'sour' => 'lemon'); function test_print($item, $key) { echo "$key holds $item\n"; } array_walk_recursive($fruits, 'test_print'); ?> ]]> </programlisting> &example.outputs; <screen role="php"> <![CDATA[ a holds apple b holds banana sour holds lemon ]]> </screen> <para> ãã¼ 'sweet' ã表示ãããªããã¨ã«ãæ°ã¥ãã§ãããã<type>array</type> ãè¦ç´ ã¨ãã¦æã¤ãã¼ã¯é¢æ°ã«æ¸¡ããã¾ããã </para> </example> </para> <simpara> <function>array_walk</function> ããã³ &seealso.callback; ãåç §ãã ããã </simpara> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-uintersect.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-uintersect.xml +++ phpdoc-ja/reference/array/functions/array-uintersect.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> <refentry id="function.array-uintersect"> <refnamediv> <refname>array_uintersect</refname> <refpurpose>ãã¼ã¿ã®æ¯è¼ã«ã³ã¼ã«ããã¯é¢æ°ãç¨ããé åã®å ±éé ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_uintersect</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>data_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_uintersect</function> ã¯ãä»ã®å ¨ã¦ã®å¼æ°ã«åå¨ãã <parameter>array1</parameter> ã®å¤ãå ¨ã¦æããé åãè¿ãã¾ãã ãã¼ã¿ã¯ã³ã¼ã«ããã¯é¢æ°ãç¨ãã¦æ¯è¼ããã¾ãã </para> <para> <example> <title><function>array_uintersect</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "GREEN", "B" => "brown", "yellow", "red"); print_r(array_uintersect($array1, $array2, "strcasecmp")); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [a] => green [b] => brown [0] => red ) ]]> </screen> </example> </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </para> <para> <function>array_intersect</function>, <function>array_uintersect_assoc</function>, <function>array_intersect_uassoc</function> ããã³ <function>array_uintersect_uassoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-uintersect-uassoc.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-uintersect-uassoc.xml +++ phpdoc-ja/reference/array/functions/array-uintersect-uassoc.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> <refentry id="function.array-uintersect-uassoc"> <refnamediv> <refname>array_uintersect_uassoc</refname> <refpurpose>ãã¼ã¿ã¨æ·»åã®æ¯è¼ã«ã³ã¼ã«ããã¯é¢æ°ãç¨ãã 追å ãããæ·»åã®ç¢ºèªãå«ãã¦é åã®å ±éé ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_uintersect_uassoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>data_compare_func</parameter></methodparam> <methodparam><type>callback</type><parameter>key_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_uintersect_uassoc</function> ã¯ãå ¨ã¦ã®å¼æ°ã«ç¾ãã <parameter>array1</parameter> ã®å ¨ã¦ã®å¤ãå«ãé åãè¿ãã¾ãã <function>array_uintersect</function>ã¨ç°ãªãããã¼ãæ¯è¼ã«ä½¿ç¨ããã ãã¨ã«æ³¨æãã¦ãã ããããã¼ã¿ã¨æ·»åã¯ã³ã¼ã«ããã¯é¢æ°ãç¨ãã¦æ¯è¼ããã¾ãã </para> <para> <example> <title><function>array_uintersect_uassoc</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "GREEN", "B" => "brown", "yellow", "red"); print_r(array_uintersect_uassoc($array1, $array2, "strcasecmp", "strcasecmp")); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [a] => green [b] => brown ) ]]> </screen> </example> </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </para> <para> <function>array_uintersect</function>, <function>array_intersect_assoc</function>, <function>array_intersect_uassoc</function> ããã³ <function>array_uintersect_assoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-uintersect-assoc.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-uintersect-assoc.xml +++ phpdoc-ja/reference/array/functions/array-uintersect-assoc.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> <refentry id="function.array-uintersect-assoc"> <refnamediv> <refname>array_uintersect_assoc</refname> <refpurpose>ãã¼ã¿ã®æ¯è¼ã«ã³ã¼ã«ããã¯é¢æ°ãç¨ãã 追å ãããæ·»åã®ç¢ºèªãå«ãã¦é åã®å ±éé ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_uintersect_assoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>data_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_uintersect_assoc</function> ã¯ãå ¨ã¦ã®å¼æ°ã«ç¾ãã <parameter>array1</parameter> ã®å ¨ã¦ã®å¤ãå«ãé åãè¿ãã¾ãã <function>array_uintersect</function>ã¨ç°ãªãããã¼ãæ¯è¼ã«ä½¿ç¨ããã ãã¨ã«æ³¨æãã¦ãã ããããã¼ã¿ã¯ã³ã¼ã«ããã¯é¢æ°ãç¨ãã¦æ¯è¼ããã¾ãã </para> <para> <example> <title><function>array_uintersect_assoc</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "GREEN", "B" => "brown", "yellow", "red"); print_r(array_uintersect_assoc($array1, $array2, "strcasecmp")); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [a] => green ) ]]> </screen> </example> </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </para> <para> <function>array_uintersect</function>, <function>array_intersect_assoc</function>, <function>array_intersect_uassoc</function> ããã³ <function>array_uintersect_uassoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-udiff.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-udiff.xml +++ phpdoc-ja/reference/array/functions/array-udiff.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.10 Maintainer: takagi Status: ready --> <refentry id="function.array-udiff"> <refnamediv> <refname>array_udiff</refname> <refpurpose>ãã¼ã¿ã®æ¯è¼ã«ã³ã¼ã«ããã¯é¢æ°ãç¨ããé åã®å·®ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_udiff</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>data_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_udiff</function> ã¯ãä»ã®å¼æ°ã®ãããã«ãåå¨ããªã <parameter>array1</parameter> ã®å¤ã®å ¨ã¦ãæããé åãè¿ãã¾ãã ãã¼ã¨å¤ã®é¢ä¿ã¯ç¶æããããã¨ã«æ³¨æãã¦ãã ããã ãã¼ã¿ã®æ¯è¼ã«ã¯ <parameter>data_compare_func</parameter> ãç¨ãããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã ãã®é¢æ°ã¯ <function>array_diff</function> ã«ä¼¼ã¦ãã¾ããããã¡ã㯠ãã¼ã¿ã®æ¯è¼ã«å é¨é¢æ°ãå©ç¨ãã¾ãã </para> <para> <example> <title><function>array_udiff</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php class cr { private $priv_member; function cr($val) { $this->priv_member = $val; } function comp_func_cr($a, $b) { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } } $a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1=> new cr(4), 2 => new cr(-15),); $b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1=> new cr(4), 2 => new cr(-15),); $result = array_udiff($a, $b, array("cr", "comp_func_cr")); print_r($result); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [0.5] => cr Object ( [priv_member:private] => 12 ) [0] => cr Object ( [priv_member:private] => 23 ) ) ]]> </screen> </example> </para> <note> <simpara> ãã®é¢æ°ã¯ n 次å é åã®ä¸ã¤ã®æ¬¡å ãããã§ãã¯ããªããã¨ã«æ³¨æãã¦ãã ããã ãã¡ããã<literal>array_udiff($array1[0], $array2[0], "data_compare_func");</literal> ã®ããã«ãããã¨ã§ããæ·±ã次å ã§ã®ãã§ãã¯ãã§ãã¾ãã </simpara> </note> <para> <function>array_diff</function>, <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff_assoc</function>, <function>array_udiff_uassoc</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_uintersect</function>, <function>array_uintersect_assoc</function> ããã³ <function>array_uintersect_uassoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-udiff-uassoc.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-udiff-uassoc.xml +++ phpdoc-ja/reference/array/functions/array-udiff-uassoc.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.11 Maintainer: takagi Status: ready --> <refentry id="function.array-udiff-uassoc"> <refnamediv> <refname>array_udiff_uassoc</refname> <refpurpose>ãã¼ã¿ã¨æ·»åã®æ¯è¼ã«ã³ã¼ã«ããã¯é¢æ°ãç¨ãã 追å ãããæ·»åã®ç¢ºèªãå«ãã¦é åã®å·®ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_udiff_uassoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>data_compare_func</parameter></methodparam> <methodparam><type>callback</type><parameter>key_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_udiff_uassoc</function> ã¯ã <parameter>array1</parameter> ããä»ã®å¼æ°ã®é åã®ä¸ã«ç¾ããªãå ¨ã¦ã® å¤ãå«ã<type>array</type> ãè¿ãã¾ãã <function>array_diff</function> ã <function>array_udiff</function> ã¨ç°ãªãããã¼ãæ¯è¼ã«ä½¿ç¨ããããã¨ã«æ³¨æãã¦ãã ããã é åã®ãã¼ã¿ã®æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ãã㯠<parameter>data_compare_func</parameter> ãç¨ãã¦è¡ããã¾ãã ãã®ç¹ã§ã<function>array_diff_assoc</function> ã¯å対ã®åä½ãã¤ã¾ã å é¨é¢æ°ãå©ç¨ããæ¯è¼ãè¡ãã¾ãããã¼ï¼æ·»åï¼ã®æ¯è¼ã¯ãã³ã¼ã«ããã¯é¢æ° <parameter>key_compare_func</parameter> ã§è¡ããã¾ãã <function>array_udiff_assoc</function> ã§ã¯å¾è ã®æ¯è¼ãå é¨é¢æ°ã§ è¡ãããã¨ããç¹ã§ããã®é¢æ°ã¨ã¯ç°ãªãã¾ãã </para> <para> <example> <title><function>array_udiff_uassoc</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php class cr { private $priv_member; function cr($val) { $this->priv_member = $val; } function comp_func_cr($a, $b) { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } function comp_func_key($a, $b) { if ($a === $b) return 0; return ($a > $b)? 1:-1; } } $a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1=> new cr(4), 2 => new cr(-15),); $b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1=> new cr(4), 2 => new cr(-15),); $result = array_udiff_uassoc($a, $b, array("cr", "comp_func_cr"), array("cr", "comp_func_key")); print_r($result); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [0.1] => cr Object ( [priv_member:private] => 9 ) [0.5] => cr Object ( [priv_member:private] => 12 ) [0] => cr Object ( [priv_member:private] => 23 ) ) ]]> </screen> </example> </para> <simpara> ä¸ã®ä¾ã§ã<literal>"1" => new cr(4)</literal> ã®çµã¿åããã両æ¹ã® é åã«ãããã¨ãããã¦ããã颿°ã®åºåã«å«ã¾ãã¦ããªããã¨ã確èªã§ãã¾ãã ã³ã¼ã«ããã¯é¢æ°ã 2 ã¤æå®ããªããã°ãªããªããã¨ã«æ³¨æãã¦ãã ããã </simpara> <simpara> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãç¨ãã¦è¡ãã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </simpara> <note> <simpara> ãã®é¢æ°ã¯ n 次å é åã®ä¸ã¤ã®æ¬¡å ãããã§ãã¯ããªããã¨ã«æ³¨æãã¦ãã ããã ãã¡ããã<literal>array_udiff_uassoc($array1[0], $array2[0], "data_compare_func", "key_compare_func");</literal> ã®ããã«ãããã¨ã§ããæ·±ã次å ã§ã®ãã§ãã¯ãã§ãã¾ãã </simpara> </note> <para> <function>array_diff</function>, <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff</function>, <function>array_udiff_assoc</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_uintersect</function>, <function>array_uintersect_assoc</function> ããã³ <function>array_uintersect_uassoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-udiff-assoc.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-udiff-assoc.xml +++ phpdoc-ja/reference/array/functions/array-udiff-assoc.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.9 Maintainer: takagi Status: ready --> <refentry id="function.array-udiff-assoc"> <refnamediv> <refname>array_udiff_assoc</refname> <refpurpose>ãã¼ã¿ã®æ¯è¼ã«ã³ã¼ã«ããã¯é¢æ°ãç¨ãã 追å ãããæ·»åã®ç¢ºèªãå«ãã¦é åã®å·®ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_udiff_assoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>data_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_udiff_assoc</function> ã¯ã <parameter>array1</parameter> ããä»ã®å¼æ°ã®é åã®ä¸ã«ç¾ããªãå ¨ã¦ã® å¤ãå«ã<type>array</type> ãè¿ãã¾ãã <function>array_diff</function> ã <function>array_udiff</function> ã¨ç°ãªãããã¼ãæ¯è¼ã«ä½¿ç¨ããããã¨ã«æ³¨æãã¦ãã ããã é åã®ãã¼ã¿ã®æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯ãç¨ãã¦è¡ããã¾ãã ãã®ç¹ã§ã<function>array_diff_assoc</function> ã¯å対ã®åä½ãã¤ã¾ã å é¨é¢æ°ãå©ç¨ããæ¯è¼ãè¡ãã¾ãã </para> <para> <example> <title><function>array_udiff_assoc</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php class cr { private $priv_member; function cr($val) { $this->priv_member = $val; } function comp_func_cr($a, $b) { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } } $a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1=> new cr(4), 2 => new cr(-15),); $b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1=> new cr(4), 2 => new cr(-15),); $result = array_udiff_assoc($a, $b, array("cr", "comp_func_cr")); print_r($result); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [0.1] => cr Object ( [priv_member:private] => 9 ) [0.5] => cr Object ( [priv_member:private] => 12 ) [0] => cr Object ( [priv_member:private] => 23 ) ) ]]> </screen> </example> </para> <simpara> ä¸ã®ä¾ã§ã<literal>"1" => new cr(4)</literal> ã®çµã¿åããã両æ¹ã® é åã«ãããã¨ãããã¦ããã颿°ã®åºåã«å«ã¾ãã¦ããªããã¨ã確èªã§ãã¾ãã </simpara> <simpara> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãç¨ãã¦è¡ãã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </simpara> <note> <simpara> ãã®é¢æ°ã¯ n 次å é åã®ä¸ã¤ã®æ¬¡å ãããã§ãã¯ããªããã¨ã«æ³¨æãã¦ãã ããã ãã¡ããã<literal>array_udiff_assoc($array1[0], $array2[0], "some_comparison_func");</literal> ã®ããã«ãããã¨ã§ããæ·±ã次å ã§ã®ãã§ãã¯ãã§ãã¾ãã </simpara> </note> <para> <function>array_diff</function>, <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff</function>, <function>array_udiff_uassoc</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_uintersect</function>, <function>array_uintersect_assoc</function> ããã³ <function>array_uintersect_uassoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-product.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-product.xml +++ phpdoc-ja/reference/array/functions/array-product.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: takagi Status: ready --> <refentry id="function.array-product"> <refnamediv> <refname>array_product</refname> <refpurpose> é åã®å¤ã®ç©ãè¨ç®ãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>number</type><methodname>array_product</methodname> <methodparam><type>array</type><parameter>array</parameter></methodparam> </methodsynopsis> <para> <function>array_product</function> ã¯ãé åã®åè¦ç´ ã®ç©ãè¨ç®ã㦠integer ã¾ã㯠float ã§è¿ãã¾ãã </para> <para> <example> <title><function>array_product</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $a = array(2, 4, 6, 8); echo "product(a) = " . array_product($a) . "\n"; ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ product(a) = 384 ]]> </screen> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-intersect-ukey.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-intersect-ukey.xml +++ phpdoc-ja/reference/array/functions/array-intersect-ukey.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: takagi Status: ready --> <refentry id="function.array-intersect-ukey"> <refnamediv> <refname>array_intersect_ukey</refname> <refpurpose>ãã¼ãåºæºã«ããã³ã¼ã«ããã¯é¢æ°ãç¨ã㦠é åã®å ±éé ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_intersect_ukey</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam> <methodparam><type>callback</type><parameter>key_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_intersect_ukey</function> ã¯ãä»ã®å ¨ã¦ã®å¼æ°ã«åå¨ãã <parameter>array1</parameter>ã®å¤ãå ¨ã¦æããé åãè¿ãã¾ãã </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </para> <para> <example> <title><function>array_intersect_ukey</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php function key_compare_func($key1, $key2) { if ($key1 == $key2) return 0; else if ($key1 > $key2) return 1; else return -1; } $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); var_dump(array_intersect_ukey($array1, $array2, 'key_compare_func')); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ array(2) { ["blue"]=> int(1) ["green"]=> int(3) }) ]]> </screen> </example> </para> <para> ãã®ä¾ã§ã¯ã両æ¹ã®é åã«åå¨ãããã¼ã <literal>'blue'</literal> 㨠<literal>'green'</literal> ã ãã§ããããããè¿ããã¦ãããã¨ã ãããã¾ããã¾ãããµãã¤ã®é åã®éã§ <literal>'blue'</literal> 㨠<literal>'green'</literal> ã«å¯¾å¿ããå¤ãéããã¨ã«ã注æãã¾ãããã ããã§ãä¸è´ãã¦ããã¨å¤å®ãããã®ã¯ããã ãã¼ã ãããã§ãã¯ããã¦ãã ããã§ããè¿ãããå¤ã¯ <parameter>array1</parameter> ã®ãã®ã§ãã </para> <para> <function>array_diff</function>, <function>array_udiff</function> <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff_assoc</function>, <function>array_udiff_uassoc</function>, <function>array_diff_key</function>, <function>array_diff_ukey</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_intersect_uassoc</function> ããã³ <function>array_intersect_key</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-intersect-uassoc.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-intersect-uassoc.xml +++ phpdoc-ja/reference/array/functions/array-intersect-uassoc.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> <refentry id="function.array-intersect-uassoc"> <refnamediv> <refname>array_intersect_uassoc</refname> <refpurpose>追å ãããæ·»åã®ç¢ºèªãå«ããã³ã¼ã«ããã¯é¢æ°ãç¨ã㦠é åã®å ±éé ã確èªãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_intersect_uassoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>key_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_intersect_uassoc</function> ã¯ãå ¨ã¦ã®å¼æ°ã«ç¾ãã <parameter>array1</parameter> ã®å ¨ã¦ã®å¤ãå«ãé åãè¿ãã¾ãã <function>array_intersect</function> ã¨ç°ãªããã¼ãæ¯è¼ã«ä½¿ç¨ããã ãã¨ã«æ³¨æãã¦ãã ããã </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </para> <para> <example> <title><function>array_intersect_uassoc</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "GREEN", "B" => "brown", "yellow", "red"); print_r(array_intersect_uassoc($array1, $array2, "strcasecmp")); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [b] => brown ) ]]> </screen> </example> </para> <para> <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_uintersect_assoc</function>, <function>array_uintersect_uassoc</function>, <function>array_intersect_key</function> ããã³ <function>array_intersect_ukey</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-intersect-key.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-intersect-key.xml +++ phpdoc-ja/reference/array/functions/array-intersect-key.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: takagi Status: ready --> <refentry id="function.array-intersect-key"> <refnamediv> <refname>array_intersect_key</refname> <refpurpose>ãã¼ãåºæºã«ãã¦é åã®å ±éé ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_intersect_key</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> </methodsynopsis> <para> <function>array_intersect_key</function> ã¯ãä»ã®å ¨ã¦ã®å¼æ°ã«åå¨ãã <parameter>array1</parameter>ã®å¤ãå ¨ã¦æããé åãè¿ãã¾ãã </para> <para> <example> <title><function>array_intersect_key</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); var_dump(array_intersect_key($array1, $array2)); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ array(2) { ["blue"]=> int(1) ["green"]=> int(3) }) ]]> </screen> </example> </para> <para> ãã®ä¾ã§ã¯ã両æ¹ã®é åã«åå¨ãããã¼ã <literal>'blue'</literal> 㨠<literal>'green'</literal> ã ãã§ããããããè¿ããã¦ãããã¨ã ãããã¾ããã¾ãããµãã¤ã®é åã®éã§ <literal>'blue'</literal> 㨠<literal>'green'</literal> ã«å¯¾å¿ããå¤ãéããã¨ã«ã注æãã¾ãããã ããã§ãä¸è´ãã¦ããã¨å¤å®ãããã®ã¯ããã ãã¼ã ãããã§ãã¯ããã¦ãã ããã§ããè¿ãããå¤ã¯ <parameter>array1</parameter> ã®ãã®ã§ãã </para> <para> äºã¤ã®è¦ç´ ã¯ã <literal>(string) $elem1 === (string) $elem2</literal>ã®å ´åã®ã¿ çããã¨ã¿ãªããã¾ããè¨ãæããã¨ãæåå表ç¾ãåãå ´åã¨ãªãã¾ãã </para> <para> <function>array_diff</function>, <function>array_udiff</function> <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff_assoc</function>, <function>array_udiff_uassoc</function>, <function>array_diff_key</function>, <function>array_diff_ukey</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_intersect_uassoc</function> ããã³ <function>array_intersect_ukey</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-diff-ukey.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-diff-ukey.xml +++ phpdoc-ja/reference/array/functions/array-diff-ukey.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: takagi Status: ready --> <refentry id="function.array-diff-ukey"> <refnamediv> <refname>array_diff_ukey</refname> <refpurpose>ãã¼ãåºæºã«ããã³ã¼ã«ããã¯é¢æ°ãç¨ã㦠é åã®å·®ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_diff_ukey</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>key_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_diff_ukey</function> ã¯ã<parameter>array1</parameter> ããä»ã®å¼æ°ã®é åã®ä¸ã«ç¾ããªãå ¨ã¦ã®å¤ãå«ãé åãè¿ãã¾ãã ãã¼ã¨å¤ã®é¢ä¿ã¯ç¶æããããã¨ã«æ³¨æãã¦ãã ããããã®é¢æ°ã¯ <function>array_diff</function> ã«ä¼¼ã¦ãã¾ãããå¤ã§ã¯ãªããã¼ã ç¨ãã¦æ¯è¼ããã¨ããç¹ãç°ãªãã¾ãã </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </para> <para> <example> <title><function>array_diff_ukey</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php function key_compare_func($key1, $key2) { if ($key1 == $key2) return 0; else if ($key1 > $key2) return 1; else return -1; } $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); var_dump(array_diff_ukey($array1, $array2, 'key_compare_func')); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ array(2) { ["red"]=> int(2) ["purple"]=> int(4) } ]]> </screen> </example> </para> <note> <simpara> ãã®é¢æ°ã¯ n 次å é åã®ä¸ã¤ã®æ¬¡å ãããã§ãã¯ããªããã¨ã«æ³¨æãã¦ãã ããã ãã¡ããã<literal>array_diff_ukey($array1[0], $array2[0], 'callback_func');</literal> ã®ããã«ãããã¨ã§ããæ·±ã次å ã§ã®ãã§ãã¯ãã§ãã¾ãã </simpara> </note> <para> <function>array_diff</function>, <function>array_udiff</function> <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff_assoc</function>, <function>array_udiff_uassoc</function>, <function>array_diff_key</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_intersect_uassoc</function>, <function>array_intersect_key</function> ããã³ <function>array_intersect_ukey</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-diff-uassoc.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-diff-uassoc.xml +++ phpdoc-ja/reference/array/functions/array-diff-uassoc.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <!-- EN-Revision: 1.7 Maintainer: takagi Status: ready --> <refentry id="function.array-diff-uassoc"> <refnamediv> <refname>array_diff_uassoc</refname> <refpurpose> ã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã 追å ãããæ·»åã®ç¢ºèªãå«ãã¦é åã®å·®ãè¨ç®ãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_diff_uassoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam> <methodparam><type>callback</type><parameter>key_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_diff_uassoc</function> ã¯ã <parameter>array1</parameter> ããä»ã®å¼æ°ã®é åã®ä¸ã«ç¾ããªãå ¨ã¦ã® å¤ãå«ã <type>array</type> ãè¿ãã¾ãã <function>array_diff</function> ã¨ç°ãªããã¼ãæ¯è¼ã«ä½¿ç¨ããããã¨ã« 注æãã¦ãã ããã </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã ããã <function>array_diff_assoc</function> ã¨ã®ç¸éç¹ã§ããã¡ã㯠æ¯è¼ã®ããã«å é¨é¢æ°ãç¨ãã¦ãã¾ãã </para> <para> <example> <title><function>array_diff_uassoc</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php function key_compare_func($a, $b) { if ($a === $b) { return 0; } return ($a > $b)? 1:-1; } $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "green", "yellow", "red"); $result = array_diff_uassoc($array1, $array2, "key_compare_func"); print_r($result); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [b] => brown [c] => blue [0] => red ) ]]> </screen> </example> </para> <simpara> ãã®ä¾ã§ã<literal>"a" => "green"</literal> ã®çµã¿åããã両æ¹ã® é åã«åå¨ãã颿°ã®åºåã«ã¯åå¨ããªããã¨ã確èªã§ãã¾ãã ããã¨ã¯ç°ãªãã<literal>0 => "red"</literal> ã¯åºåããã¦ãã¾ãã ãªããªã 2 ã¤ãã®å¼æ°ã® <literal>"red"</literal> ã¯ããã¼ã <literal>1</literal> ã ããã§ãã </simpara> <simpara> 2 ã¤ã®ã¤ã³ããã¯ã¹ãçãããã©ããã¯ãã¦ã¼ã¶ãæå®ãã ã³ã¼ã«ããã¯é¢æ°ã§èª¿ã¹ã¾ãã </simpara> <note> <simpara> ãã®é¢æ°ã¯ n 次å é åã®ä¸ã¤ã®æ¬¡å ãããã§ãã¯ããªããã¨ã«æ³¨æãã¦ãã ããã ãã¡ããã<literal>array_diff_uassoc($array1[0], $array2[0], "key_compare_func");</literal> ã®ããã«ãããã¨ã§ããæ·±ã次å ã§ã®ãã§ãã¯ãã§ãã¾ãã </simpara> </note> <para> <function>array_diff</function>, <function>array_diff_assoc</function>, <function>array_udiff</function>, <function>array_udiff_assoc</function>, <function>array_udiff_uassoc</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_uintersect</function>, <function>array_uintersect_assoc</function> ããã³ <function>array_uintersect_uassoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-diff-key.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-diff-key.xml +++ phpdoc-ja/reference/array/functions/array-diff-key.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: takagi Status: ready --> <refentry id="function.array-diff-key"> <refnamediv> <refname>array_diff_key</refname> <refpurpose>ãã¼ãåºæºã«ãã¦é åã®å·®ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_diff_key</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> </methodsynopsis> <para> <function>array_diff_key</function> ã¯ã<parameter>array1</parameter> ããä»ã®å¼æ°ã®é åã®ä¸ã«ç¾ããªãå ¨ã¦ã®å¤ãå«ãé åãè¿ãã¾ãã ãã¼ã¨å¤ã®é¢ä¿ã¯ç¶æããããã¨ã«æ³¨æãã¦ãã ããããã®é¢æ°ã¯ <function>array_diff</function> ã«ä¼¼ã¦ãã¾ãããå¤ã§ã¯ãªããã¼ã ç¨ãã¦æ¯è¼ããã¨ããç¹ãç°ãªãã¾ãã </para> <para> <example> <title><function>array_diff_key</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); var_dump(array_diff_key($array1, $array2)); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ array(2) { ["red"]=> int(2) ["purple"]=> int(4) } ]]> </screen> </example> </para> <simpara> äºã¤ã®è¦ç´ ã¯ã<literal>(string) $elem1 === (string) $elem2</literal> ã®å ´åã®ã¿çããã¨è¦ãªããã¾ããè¨ãæããã¨ãæåå表ç¾ãåãå ´å㨠ãªãã¾ãã </simpara> <note> <simpara> ãã®é¢æ°ã¯ n 次å é åã®ä¸ã¤ã®æ¬¡å ãããã§ãã¯ããªããã¨ã«æ³¨æãã¦ãã ããã ãã¡ããã<literal>array_diff_key($array1[0], $array2[0]);</literal> ã®ããã«ãããã¨ã§ããæ·±ã次å ã§ã®ãã§ãã¯ãã§ãã¾ãã </simpara> </note> <para> <function>array_diff</function>, <function>array_udiff</function> <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff_assoc</function>, <function>array_udiff_uassoc</function>, <function>array_diff_ukey</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_intersect_uassoc</function>, <function>array_intersect_key</function> ããã³ <function>array_intersect_ukey</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-walk-recursive.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-walk-recursive.xml +++ phpdoc-ja/reference/array/functions/array-walk-recursive.xml <?xml version='1.0' encoding='utf-8'?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.8 Maintainer: takagi Status: ready --> <refentry id="function.array-walk-recursive"> <refnamediv> <refname>array_walk_recursive</refname> <refpurpose> é åã®å ¨ã¦ã®è¦ç´ ã«ãã¦ã¼ã¶ã¼é¢æ°ãå帰çã«é©ç¨ãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>bool</type><methodname>array_walk_recursive</methodname> <methodparam><type>array</type><parameter role="reference">input</parameter></methodparam> <methodparam><type>callback</type><parameter>funcname</parameter></methodparam> <methodparam choice="opt"><type>mixed</type><parameter>userdata</parameter></methodparam> </methodsynopsis> <simpara> <parameter>input</parameter> é åã®åè¦ç´ ã«ã¦ã¼ã¶å®ç¾©é¢æ° <parameter>funcname</parameter>ãé©ç¨ãã¾ãã ãã®é¢æ°ã¯é åã®è¦ç´ å ãå帰çã«ãã©ã£ã¦ããã¾ããé常ã <parameter>funcname</parameter> ã¯å¼æ°ãäºã¤ã¨ãã¾ãã <parameter>input</parameter> ãã©ã¡ã¼ã¿ã®å¤ãæåã®å¼æ°ã ãã¼/æ·»åã¯äºçªç®ã®å¼æ°ã¨ãªãã¾ãã ãªãã·ã§ã³ã® <parameter>userdata</parameter> ãã©ã¡ã¼ã¿ãæå®ãããå ´åã ã³ã¼ã«ããã¯é¢æ° <parameter>funcname</parameter> ã¸ã®ä¸çªç®ã®å¼æ°ã¨ã㦠渡ããã¾ãã </simpara> <simpara> &return.success; </simpara> <note> <para> <parameter>funcname</parameter> ã«ããé åã®å¤ãã®ãã®ã夿´ããå¿ è¦ã ããå ´åã<parameter>funcname</parameter> ã®æåã®å¼æ°ã¯ <link linkend="language.references">åç §</link>ã¨ã㦠渡ãå¿ è¦ãããã¾ãããã®å ´åãé åã®è¦ç´ ã«å ãã夿´ã¯ã é åèªä½ã«å¯¾ãã¦è¡ããã¾ãã </para> </note> <para> <example> <title><function>array_walk_recursive</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $sweet = array('a' => 'apple', 'b' => 'banana'); $fruits = array('sweet' => $sweet, 'sour' => 'lemon'); function test_print($item, $key) { echo "$key holds $item\n"; } array_walk_recursive($fruits, 'test_print'); ?> ]]> </programlisting> &example.outputs; <screen role="php"> <![CDATA[ a holds apple b holds banana sour holds lemon ]]> </screen> <para> ãã¼ 'sweet' ã表示ãããªããã¨ã«ãæ°ã¥ãã§ãããã<type>array</type> ãè¦ç´ ã¨ãã¦æã¤ãã¼ã¯é¢æ°ã«æ¸¡ããã¾ããã </para> </example> </para> <simpara> <function>array_walk</function> ããã³ &seealso.callback; ãåç §ãã ããã </simpara> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-uintersect.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-uintersect.xml +++ phpdoc-ja/reference/array/functions/array-uintersect.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> <refentry id="function.array-uintersect"> <refnamediv> <refname>array_uintersect</refname> <refpurpose>ãã¼ã¿ã®æ¯è¼ã«ã³ã¼ã«ããã¯é¢æ°ãç¨ããé åã®å ±éé ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_uintersect</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>data_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_uintersect</function> ã¯ãä»ã®å ¨ã¦ã®å¼æ°ã«åå¨ãã <parameter>array1</parameter> ã®å¤ãå ¨ã¦æããé åãè¿ãã¾ãã ãã¼ã¿ã¯ã³ã¼ã«ããã¯é¢æ°ãç¨ãã¦æ¯è¼ããã¾ãã </para> <para> <example> <title><function>array_uintersect</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "GREEN", "B" => "brown", "yellow", "red"); print_r(array_uintersect($array1, $array2, "strcasecmp")); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [a] => green [b] => brown [0] => red ) ]]> </screen> </example> </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </para> <para> <function>array_intersect</function>, <function>array_uintersect_assoc</function>, <function>array_intersect_uassoc</function> ããã³ <function>array_uintersect_uassoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-uintersect-uassoc.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-uintersect-uassoc.xml +++ phpdoc-ja/reference/array/functions/array-uintersect-uassoc.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> <refentry id="function.array-uintersect-uassoc"> <refnamediv> <refname>array_uintersect_uassoc</refname> <refpurpose>ãã¼ã¿ã¨æ·»åã®æ¯è¼ã«ã³ã¼ã«ããã¯é¢æ°ãç¨ãã 追å ãããæ·»åã®ç¢ºèªãå«ãã¦é åã®å ±éé ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_uintersect_uassoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>data_compare_func</parameter></methodparam> <methodparam><type>callback</type><parameter>key_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_uintersect_uassoc</function> ã¯ãå ¨ã¦ã®å¼æ°ã«ç¾ãã <parameter>array1</parameter> ã®å ¨ã¦ã®å¤ãå«ãé åãè¿ãã¾ãã <function>array_uintersect</function>ã¨ç°ãªãããã¼ãæ¯è¼ã«ä½¿ç¨ããã ãã¨ã«æ³¨æãã¦ãã ããããã¼ã¿ã¨æ·»åã¯ã³ã¼ã«ããã¯é¢æ°ãç¨ãã¦æ¯è¼ããã¾ãã </para> <para> <example> <title><function>array_uintersect_uassoc</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "GREEN", "B" => "brown", "yellow", "red"); print_r(array_uintersect_uassoc($array1, $array2, "strcasecmp", "strcasecmp")); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [a] => green [b] => brown ) ]]> </screen> </example> </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </para> <para> <function>array_uintersect</function>, <function>array_intersect_assoc</function>, <function>array_intersect_uassoc</function> ããã³ <function>array_uintersect_assoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-uintersect-assoc.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-uintersect-assoc.xml +++ phpdoc-ja/reference/array/functions/array-uintersect-assoc.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> <refentry id="function.array-uintersect-assoc"> <refnamediv> <refname>array_uintersect_assoc</refname> <refpurpose>ãã¼ã¿ã®æ¯è¼ã«ã³ã¼ã«ããã¯é¢æ°ãç¨ãã 追å ãããæ·»åã®ç¢ºèªãå«ãã¦é åã®å ±éé ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_uintersect_assoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>data_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_uintersect_assoc</function> ã¯ãå ¨ã¦ã®å¼æ°ã«ç¾ãã <parameter>array1</parameter> ã®å ¨ã¦ã®å¤ãå«ãé åãè¿ãã¾ãã <function>array_uintersect</function>ã¨ç°ãªãããã¼ãæ¯è¼ã«ä½¿ç¨ããã ãã¨ã«æ³¨æãã¦ãã ããããã¼ã¿ã¯ã³ã¼ã«ããã¯é¢æ°ãç¨ãã¦æ¯è¼ããã¾ãã </para> <para> <example> <title><function>array_uintersect_assoc</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "GREEN", "B" => "brown", "yellow", "red"); print_r(array_uintersect_assoc($array1, $array2, "strcasecmp")); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [a] => green ) ]]> </screen> </example> </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </para> <para> <function>array_uintersect</function>, <function>array_intersect_assoc</function>, <function>array_intersect_uassoc</function> ããã³ <function>array_uintersect_uassoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-udiff.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-udiff.xml +++ phpdoc-ja/reference/array/functions/array-udiff.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.10 Maintainer: takagi Status: ready --> <refentry id="function.array-udiff"> <refnamediv> <refname>array_udiff</refname> <refpurpose>ãã¼ã¿ã®æ¯è¼ã«ã³ã¼ã«ããã¯é¢æ°ãç¨ããé åã®å·®ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_udiff</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>data_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_udiff</function> ã¯ãä»ã®å¼æ°ã®ãããã«ãåå¨ããªã <parameter>array1</parameter> ã®å¤ã®å ¨ã¦ãæããé åãè¿ãã¾ãã ãã¼ã¨å¤ã®é¢ä¿ã¯ç¶æããããã¨ã«æ³¨æãã¦ãã ããã ãã¼ã¿ã®æ¯è¼ã«ã¯ <parameter>data_compare_func</parameter> ãç¨ãããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã ãã®é¢æ°ã¯ <function>array_diff</function> ã«ä¼¼ã¦ãã¾ããããã¡ã㯠ãã¼ã¿ã®æ¯è¼ã«å é¨é¢æ°ãå©ç¨ãã¾ãã </para> <para> <example> <title><function>array_udiff</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php class cr { private $priv_member; function cr($val) { $this->priv_member = $val; } function comp_func_cr($a, $b) { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } } $a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1=> new cr(4), 2 => new cr(-15),); $b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1=> new cr(4), 2 => new cr(-15),); $result = array_udiff($a, $b, array("cr", "comp_func_cr")); print_r($result); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [0.5] => cr Object ( [priv_member:private] => 12 ) [0] => cr Object ( [priv_member:private] => 23 ) ) ]]> </screen> </example> </para> <note> <simpara> ãã®é¢æ°ã¯ n 次å é åã®ä¸ã¤ã®æ¬¡å ãããã§ãã¯ããªããã¨ã«æ³¨æãã¦ãã ããã ãã¡ããã<literal>array_udiff($array1[0], $array2[0], "data_compare_func");</literal> ã®ããã«ãããã¨ã§ããæ·±ã次å ã§ã®ãã§ãã¯ãã§ãã¾ãã </simpara> </note> <para> <function>array_diff</function>, <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff_assoc</function>, <function>array_udiff_uassoc</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_uintersect</function>, <function>array_uintersect_assoc</function> ããã³ <function>array_uintersect_uassoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-udiff-uassoc.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-udiff-uassoc.xml +++ phpdoc-ja/reference/array/functions/array-udiff-uassoc.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.11 Maintainer: takagi Status: ready --> <refentry id="function.array-udiff-uassoc"> <refnamediv> <refname>array_udiff_uassoc</refname> <refpurpose>ãã¼ã¿ã¨æ·»åã®æ¯è¼ã«ã³ã¼ã«ããã¯é¢æ°ãç¨ãã 追å ãããæ·»åã®ç¢ºèªãå«ãã¦é åã®å·®ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_udiff_uassoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>data_compare_func</parameter></methodparam> <methodparam><type>callback</type><parameter>key_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_udiff_uassoc</function> ã¯ã <parameter>array1</parameter> ããä»ã®å¼æ°ã®é åã®ä¸ã«ç¾ããªãå ¨ã¦ã® å¤ãå«ã<type>array</type> ãè¿ãã¾ãã <function>array_diff</function> ã <function>array_udiff</function> ã¨ç°ãªãããã¼ãæ¯è¼ã«ä½¿ç¨ããããã¨ã«æ³¨æãã¦ãã ããã é åã®ãã¼ã¿ã®æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ãã㯠<parameter>data_compare_func</parameter> ãç¨ãã¦è¡ããã¾ãã ãã®ç¹ã§ã<function>array_diff_assoc</function> ã¯å対ã®åä½ãã¤ã¾ã å é¨é¢æ°ãå©ç¨ããæ¯è¼ãè¡ãã¾ãããã¼ï¼æ·»åï¼ã®æ¯è¼ã¯ãã³ã¼ã«ããã¯é¢æ° <parameter>key_compare_func</parameter> ã§è¡ããã¾ãã <function>array_udiff_assoc</function> ã§ã¯å¾è ã®æ¯è¼ãå é¨é¢æ°ã§ è¡ãããã¨ããç¹ã§ããã®é¢æ°ã¨ã¯ç°ãªãã¾ãã </para> <para> <example> <title><function>array_udiff_uassoc</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php class cr { private $priv_member; function cr($val) { $this->priv_member = $val; } function comp_func_cr($a, $b) { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } function comp_func_key($a, $b) { if ($a === $b) return 0; return ($a > $b)? 1:-1; } } $a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1=> new cr(4), 2 => new cr(-15),); $b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1=> new cr(4), 2 => new cr(-15),); $result = array_udiff_uassoc($a, $b, array("cr", "comp_func_cr"), array("cr", "comp_func_key")); print_r($result); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [0.1] => cr Object ( [priv_member:private] => 9 ) [0.5] => cr Object ( [priv_member:private] => 12 ) [0] => cr Object ( [priv_member:private] => 23 ) ) ]]> </screen> </example> </para> <simpara> ä¸ã®ä¾ã§ã<literal>"1" => new cr(4)</literal> ã®çµã¿åããã両æ¹ã® é åã«ãããã¨ãããã¦ããã颿°ã®åºåã«å«ã¾ãã¦ããªããã¨ã確èªã§ãã¾ãã ã³ã¼ã«ããã¯é¢æ°ã 2 ã¤æå®ããªããã°ãªããªããã¨ã«æ³¨æãã¦ãã ããã </simpara> <simpara> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãç¨ãã¦è¡ãã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </simpara> <note> <simpara> ãã®é¢æ°ã¯ n 次å é åã®ä¸ã¤ã®æ¬¡å ãããã§ãã¯ããªããã¨ã«æ³¨æãã¦ãã ããã ãã¡ããã<literal>array_udiff_uassoc($array1[0], $array2[0], "data_compare_func", "key_compare_func");</literal> ã®ããã«ãããã¨ã§ããæ·±ã次å ã§ã®ãã§ãã¯ãã§ãã¾ãã </simpara> </note> <para> <function>array_diff</function>, <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff</function>, <function>array_udiff_assoc</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_uintersect</function>, <function>array_uintersect_assoc</function> ããã³ <function>array_uintersect_uassoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-udiff-assoc.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-udiff-assoc.xml +++ phpdoc-ja/reference/array/functions/array-udiff-assoc.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.9 Maintainer: takagi Status: ready --> <refentry id="function.array-udiff-assoc"> <refnamediv> <refname>array_udiff_assoc</refname> <refpurpose>ãã¼ã¿ã®æ¯è¼ã«ã³ã¼ã«ããã¯é¢æ°ãç¨ãã 追å ãããæ·»åã®ç¢ºèªãå«ãã¦é åã®å·®ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_udiff_assoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>data_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_udiff_assoc</function> ã¯ã <parameter>array1</parameter> ããä»ã®å¼æ°ã®é åã®ä¸ã«ç¾ããªãå ¨ã¦ã® å¤ãå«ã<type>array</type> ãè¿ãã¾ãã <function>array_diff</function> ã <function>array_udiff</function> ã¨ç°ãªãããã¼ãæ¯è¼ã«ä½¿ç¨ããããã¨ã«æ³¨æãã¦ãã ããã é åã®ãã¼ã¿ã®æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯ãç¨ãã¦è¡ããã¾ãã ãã®ç¹ã§ã<function>array_diff_assoc</function> ã¯å対ã®åä½ãã¤ã¾ã å é¨é¢æ°ãå©ç¨ããæ¯è¼ãè¡ãã¾ãã </para> <para> <example> <title><function>array_udiff_assoc</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php class cr { private $priv_member; function cr($val) { $this->priv_member = $val; } function comp_func_cr($a, $b) { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } } $a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1=> new cr(4), 2 => new cr(-15),); $b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr(3), 1=> new cr(4), 2 => new cr(-15),); $result = array_udiff_assoc($a, $b, array("cr", "comp_func_cr")); print_r($result); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [0.1] => cr Object ( [priv_member:private] => 9 ) [0.5] => cr Object ( [priv_member:private] => 12 ) [0] => cr Object ( [priv_member:private] => 23 ) ) ]]> </screen> </example> </para> <simpara> ä¸ã®ä¾ã§ã<literal>"1" => new cr(4)</literal> ã®çµã¿åããã両æ¹ã® é åã«ãããã¨ãããã¦ããã颿°ã®åºåã«å«ã¾ãã¦ããªããã¨ã確èªã§ãã¾ãã </simpara> <simpara> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãç¨ãã¦è¡ãã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </simpara> <note> <simpara> ãã®é¢æ°ã¯ n 次å é åã®ä¸ã¤ã®æ¬¡å ãããã§ãã¯ããªããã¨ã«æ³¨æãã¦ãã ããã ãã¡ããã<literal>array_udiff_assoc($array1[0], $array2[0], "some_comparison_func");</literal> ã®ããã«ãããã¨ã§ããæ·±ã次å ã§ã®ãã§ãã¯ãã§ãã¾ãã </simpara> </note> <para> <function>array_diff</function>, <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff</function>, <function>array_udiff_uassoc</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_uintersect</function>, <function>array_uintersect_assoc</function> ããã³ <function>array_uintersect_uassoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-product.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-product.xml +++ phpdoc-ja/reference/array/functions/array-product.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: takagi Status: ready --> <refentry id="function.array-product"> <refnamediv> <refname>array_product</refname> <refpurpose> é åã®å¤ã®ç©ãè¨ç®ãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>number</type><methodname>array_product</methodname> <methodparam><type>array</type><parameter>array</parameter></methodparam> </methodsynopsis> <para> <function>array_product</function> ã¯ãé åã®åè¦ç´ ã®ç©ãè¨ç®ã㦠integer ã¾ã㯠float ã§è¿ãã¾ãã </para> <para> <example> <title><function>array_product</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $a = array(2, 4, 6, 8); echo "product(a) = " . array_product($a) . "\n"; ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ product(a) = 384 ]]> </screen> </example> </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-intersect-ukey.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-intersect-ukey.xml +++ phpdoc-ja/reference/array/functions/array-intersect-ukey.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: takagi Status: ready --> <refentry id="function.array-intersect-ukey"> <refnamediv> <refname>array_intersect_ukey</refname> <refpurpose>ãã¼ãåºæºã«ããã³ã¼ã«ããã¯é¢æ°ãç¨ã㦠é åã®å ±éé ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_intersect_ukey</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam> <methodparam><type>callback</type><parameter>key_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_intersect_ukey</function> ã¯ãä»ã®å ¨ã¦ã®å¼æ°ã«åå¨ãã <parameter>array1</parameter>ã®å¤ãå ¨ã¦æããé åãè¿ãã¾ãã </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </para> <para> <example> <title><function>array_intersect_ukey</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php function key_compare_func($key1, $key2) { if ($key1 == $key2) return 0; else if ($key1 > $key2) return 1; else return -1; } $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); var_dump(array_intersect_ukey($array1, $array2, 'key_compare_func')); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ array(2) { ["blue"]=> int(1) ["green"]=> int(3) }) ]]> </screen> </example> </para> <para> ãã®ä¾ã§ã¯ã両æ¹ã®é åã«åå¨ãããã¼ã <literal>'blue'</literal> 㨠<literal>'green'</literal> ã ãã§ããããããè¿ããã¦ãããã¨ã ãããã¾ããã¾ãããµãã¤ã®é åã®éã§ <literal>'blue'</literal> 㨠<literal>'green'</literal> ã«å¯¾å¿ããå¤ãéããã¨ã«ã注æãã¾ãããã ããã§ãä¸è´ãã¦ããã¨å¤å®ãããã®ã¯ããã ãã¼ã ãããã§ãã¯ããã¦ãã ããã§ããè¿ãããå¤ã¯ <parameter>array1</parameter> ã®ãã®ã§ãã </para> <para> <function>array_diff</function>, <function>array_udiff</function> <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff_assoc</function>, <function>array_udiff_uassoc</function>, <function>array_diff_key</function>, <function>array_diff_ukey</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_intersect_uassoc</function> ããã³ <function>array_intersect_key</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-intersect-uassoc.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-intersect-uassoc.xml +++ phpdoc-ja/reference/array/functions/array-intersect-uassoc.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: takagi Status: ready --> <refentry id="function.array-intersect-uassoc"> <refnamediv> <refname>array_intersect_uassoc</refname> <refpurpose>追å ãããæ·»åã®ç¢ºèªãå«ããã³ã¼ã«ããã¯é¢æ°ãç¨ã㦠é åã®å ±éé ã確èªãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_intersect_uassoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>key_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_intersect_uassoc</function> ã¯ãå ¨ã¦ã®å¼æ°ã«ç¾ãã <parameter>array1</parameter> ã®å ¨ã¦ã®å¤ãå«ãé åãè¿ãã¾ãã <function>array_intersect</function> ã¨ç°ãªããã¼ãæ¯è¼ã«ä½¿ç¨ããã ãã¨ã«æ³¨æãã¦ãã ããã </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </para> <para> <example> <title><function>array_intersect_uassoc</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "GREEN", "B" => "brown", "yellow", "red"); print_r(array_intersect_uassoc($array1, $array2, "strcasecmp")); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [b] => brown ) ]]> </screen> </example> </para> <para> <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_uintersect_assoc</function>, <function>array_uintersect_uassoc</function>, <function>array_intersect_key</function> ããã³ <function>array_intersect_ukey</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-intersect-key.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-intersect-key.xml +++ phpdoc-ja/reference/array/functions/array-intersect-key.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: takagi Status: ready --> <refentry id="function.array-intersect-key"> <refnamediv> <refname>array_intersect_key</refname> <refpurpose>ãã¼ãåºæºã«ãã¦é åã®å ±éé ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_intersect_key</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> </methodsynopsis> <para> <function>array_intersect_key</function> ã¯ãä»ã®å ¨ã¦ã®å¼æ°ã«åå¨ãã <parameter>array1</parameter>ã®å¤ãå ¨ã¦æããé åãè¿ãã¾ãã </para> <para> <example> <title><function>array_intersect_key</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); var_dump(array_intersect_key($array1, $array2)); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ array(2) { ["blue"]=> int(1) ["green"]=> int(3) }) ]]> </screen> </example> </para> <para> ãã®ä¾ã§ã¯ã両æ¹ã®é åã«åå¨ãããã¼ã <literal>'blue'</literal> 㨠<literal>'green'</literal> ã ãã§ããããããè¿ããã¦ãããã¨ã ãããã¾ããã¾ãããµãã¤ã®é åã®éã§ <literal>'blue'</literal> 㨠<literal>'green'</literal> ã«å¯¾å¿ããå¤ãéããã¨ã«ã注æãã¾ãããã ããã§ãä¸è´ãã¦ããã¨å¤å®ãããã®ã¯ããã ãã¼ã ãããã§ãã¯ããã¦ãã ããã§ããè¿ãããå¤ã¯ <parameter>array1</parameter> ã®ãã®ã§ãã </para> <para> äºã¤ã®è¦ç´ ã¯ã <literal>(string) $elem1 === (string) $elem2</literal>ã®å ´åã®ã¿ çããã¨ã¿ãªããã¾ããè¨ãæããã¨ãæåå表ç¾ãåãå ´åã¨ãªãã¾ãã </para> <para> <function>array_diff</function>, <function>array_udiff</function> <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff_assoc</function>, <function>array_udiff_uassoc</function>, <function>array_diff_key</function>, <function>array_diff_ukey</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_intersect_uassoc</function> ããã³ <function>array_intersect_ukey</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-diff-ukey.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-diff-ukey.xml +++ phpdoc-ja/reference/array/functions/array-diff-ukey.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: takagi Status: ready --> <refentry id="function.array-diff-ukey"> <refnamediv> <refname>array_diff_ukey</refname> <refpurpose>ãã¼ãåºæºã«ããã³ã¼ã«ããã¯é¢æ°ãç¨ã㦠é åã®å·®ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_diff_ukey</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> <methodparam><type>callback</type><parameter>key_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_diff_ukey</function> ã¯ã<parameter>array1</parameter> ããä»ã®å¼æ°ã®é åã®ä¸ã«ç¾ããªãå ¨ã¦ã®å¤ãå«ãé åãè¿ãã¾ãã ãã¼ã¨å¤ã®é¢ä¿ã¯ç¶æããããã¨ã«æ³¨æãã¦ãã ããããã®é¢æ°ã¯ <function>array_diff</function> ã«ä¼¼ã¦ãã¾ãããå¤ã§ã¯ãªããã¼ã ç¨ãã¦æ¯è¼ããã¨ããç¹ãç°ãªãã¾ãã </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã </para> <para> <example> <title><function>array_diff_ukey</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php function key_compare_func($key1, $key2) { if ($key1 == $key2) return 0; else if ($key1 > $key2) return 1; else return -1; } $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); var_dump(array_diff_ukey($array1, $array2, 'key_compare_func')); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ array(2) { ["red"]=> int(2) ["purple"]=> int(4) } ]]> </screen> </example> </para> <note> <simpara> ãã®é¢æ°ã¯ n 次å é åã®ä¸ã¤ã®æ¬¡å ãããã§ãã¯ããªããã¨ã«æ³¨æãã¦ãã ããã ãã¡ããã<literal>array_diff_ukey($array1[0], $array2[0], 'callback_func');</literal> ã®ããã«ãããã¨ã§ããæ·±ã次å ã§ã®ãã§ãã¯ãã§ãã¾ãã </simpara> </note> <para> <function>array_diff</function>, <function>array_udiff</function> <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff_assoc</function>, <function>array_udiff_uassoc</function>, <function>array_diff_key</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_intersect_uassoc</function>, <function>array_intersect_key</function> ããã³ <function>array_intersect_ukey</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-diff-uassoc.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-diff-uassoc.xml +++ phpdoc-ja/reference/array/functions/array-diff-uassoc.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- splitted from ./en/functions/array.xml, last change in rev 1.14 --> <!-- EN-Revision: 1.7 Maintainer: takagi Status: ready --> <refentry id="function.array-diff-uassoc"> <refnamediv> <refname>array_diff_uassoc</refname> <refpurpose> ã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã 追å ãããæ·»åã®ç¢ºèªãå«ãã¦é åã®å·®ãè¨ç®ãã </refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_diff_uassoc</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter>...</parameter></methodparam> <methodparam><type>callback</type><parameter>key_compare_func</parameter></methodparam> </methodsynopsis> <para> <function>array_diff_uassoc</function> ã¯ã <parameter>array1</parameter> ããä»ã®å¼æ°ã®é åã®ä¸ã«ç¾ããªãå ¨ã¦ã® å¤ãå«ã <type>array</type> ãè¿ãã¾ãã <function>array_diff</function> ã¨ç°ãªããã¼ãæ¯è¼ã«ä½¿ç¨ããããã¨ã« 注æãã¦ãã ããã </para> <para> æ¯è¼ã¯ãã¦ã¼ã¶ãæå®ããã³ã¼ã«ããã¯é¢æ°ãå©ç¨ãã¦è¡ããã¾ãã ãã®é¢æ°ã¯ã1 ã¤ãã®å¼æ°ã 2 ã¤ãããå°ãã / çãã / 大ãã å ´åã«ãããã è² ã®æ° / ã¼ã / æ£ã®æ° ãè¿ãå¿ è¦ãããã¾ãã ããã <function>array_diff_assoc</function> ã¨ã®ç¸éç¹ã§ããã¡ã㯠æ¯è¼ã®ããã«å é¨é¢æ°ãç¨ãã¦ãã¾ãã </para> <para> <example> <title><function>array_diff_uassoc</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php function key_compare_func($a, $b) { if ($a === $b) { return 0; } return ($a > $b)? 1:-1; } $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "green", "yellow", "red"); $result = array_diff_uassoc($array1, $array2, "key_compare_func"); print_r($result); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ Array ( [b] => brown [c] => blue [0] => red ) ]]> </screen> </example> </para> <simpara> ãã®ä¾ã§ã<literal>"a" => "green"</literal> ã®çµã¿åããã両æ¹ã® é åã«åå¨ãã颿°ã®åºåã«ã¯åå¨ããªããã¨ã確èªã§ãã¾ãã ããã¨ã¯ç°ãªãã<literal>0 => "red"</literal> ã¯åºåããã¦ãã¾ãã ãªããªã 2 ã¤ãã®å¼æ°ã® <literal>"red"</literal> ã¯ããã¼ã <literal>1</literal> ã ããã§ãã </simpara> <simpara> 2 ã¤ã®ã¤ã³ããã¯ã¹ãçãããã©ããã¯ãã¦ã¼ã¶ãæå®ãã ã³ã¼ã«ããã¯é¢æ°ã§èª¿ã¹ã¾ãã </simpara> <note> <simpara> ãã®é¢æ°ã¯ n 次å é åã®ä¸ã¤ã®æ¬¡å ãããã§ãã¯ããªããã¨ã«æ³¨æãã¦ãã ããã ãã¡ããã<literal>array_diff_uassoc($array1[0], $array2[0], "key_compare_func");</literal> ã®ããã«ãããã¨ã§ããæ·±ã次å ã§ã®ãã§ãã¯ãã§ãã¾ãã </simpara> </note> <para> <function>array_diff</function>, <function>array_diff_assoc</function>, <function>array_udiff</function>, <function>array_udiff_assoc</function>, <function>array_udiff_uassoc</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_uintersect</function>, <function>array_uintersect_assoc</function> ããã³ <function>array_uintersect_uassoc</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/phpdoc-ja/reference/array/functions/array-diff-key.xml?r=1.1&p=1 Index: phpdoc-ja/reference/array/functions/array-diff-key.xml +++ phpdoc-ja/reference/array/functions/array-diff-key.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: takagi Status: ready --> <refentry id="function.array-diff-key"> <refnamediv> <refname>array_diff_key</refname> <refpurpose>ãã¼ãåºæºã«ãã¦é åã®å·®ãè¨ç®ãã</refpurpose> </refnamediv> <refsect1> <title>説æ</title> <methodsynopsis> <type>array</type><methodname>array_diff_key</methodname> <methodparam><type>array</type><parameter>array1</parameter></methodparam> <methodparam><type>array</type><parameter>array2</parameter></methodparam> <methodparam choice="opt"><type>array</type><parameter> ...</parameter></methodparam> </methodsynopsis> <para> <function>array_diff_key</function> ã¯ã<parameter>array1</parameter> ããä»ã®å¼æ°ã®é åã®ä¸ã«ç¾ããªãå ¨ã¦ã®å¤ãå«ãé åãè¿ãã¾ãã ãã¼ã¨å¤ã®é¢ä¿ã¯ç¶æããããã¨ã«æ³¨æãã¦ãã ããããã®é¢æ°ã¯ <function>array_diff</function> ã«ä¼¼ã¦ãã¾ãããå¤ã§ã¯ãªããã¼ã ç¨ãã¦æ¯è¼ããã¨ããç¹ãç°ãªãã¾ãã </para> <para> <example> <title><function>array_diff_key</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ <?php $array1 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); $array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); var_dump(array_diff_key($array1, $array2)); ?> ]]> </programlisting> &example.outputs; <screen> <![CDATA[ array(2) { ["red"]=> int(2) ["purple"]=> int(4) } ]]> </screen> </example> </para> <simpara> äºã¤ã®è¦ç´ ã¯ã<literal>(string) $elem1 === (string) $elem2</literal> ã®å ´åã®ã¿çããã¨è¦ãªããã¾ããè¨ãæããã¨ãæåå表ç¾ãåãå ´å㨠ãªãã¾ãã </simpara> <note> <simpara> ãã®é¢æ°ã¯ n 次å é åã®ä¸ã¤ã®æ¬¡å ãããã§ãã¯ããªããã¨ã«æ³¨æãã¦ãã ããã ãã¡ããã<literal>array_diff_key($array1[0], $array2[0]);</literal> ã®ããã«ãããã¨ã§ããæ·±ã次å ã§ã®ãã§ãã¯ãã§ãã¾ãã </simpara> </note> <para> <function>array_diff</function>, <function>array_udiff</function> <function>array_diff_assoc</function>, <function>array_diff_uassoc</function>, <function>array_udiff_assoc</function>, <function>array_udiff_uassoc</function>, <function>array_diff_ukey</function>, <function>array_intersect</function>, <function>array_intersect_assoc</function>, <function>array_intersect_uassoc</function>, <function>array_intersect_key</function> ããã³ <function>array_intersect_ukey</function> ãåç §ãã ããã </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->