cvs: phpdoc-zh /reference/array/functions array-diff-assoc.xml array-diff-uassoc.xml array-diff-ukey.xml array-intersect-assoc.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 array-walk.xml pos.xml sizeof.xml
| From: | Dallas Thunder | Date: | Thu, 01 Sep 2005 15:35:35 +0000 |
| Subject: | cvs: phpdoc-zh /reference/array/functions array-diff-assoc.xml array-diff-uassoc.xml array-diff-ukey.xml array-intersect-assoc.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 array-walk.xml pos.xml sizeof.xml |
||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-2567@lists.php.net to get a copy of this message | ||
dallas Thu Sep 1 11:35:35 2005 EDT
Added files:
/phpdoc-zh/reference/array/functions 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
Modified files:
/phpdoc-zh/reference/array/functions array-diff-assoc.xml
array-diff-uassoc.xml
array-diff-ukey.xml
array-intersect-assoc.xml
array-intersect-key.xml
array-walk.xml pos.xml
sizeof.xml
Log:
Add new files.
http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/array-diff-assoc.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-zh/reference/array/functions/array-diff-assoc.xml diff -u phpdoc-zh/reference/array/functions/array-diff-assoc.xml:1.4 phpdoc-zh/reference/array/functions/array-diff-assoc.xml:1.5 --- phpdoc-zh/reference/array/functions/array-diff-assoc.xml:1.4 Tue Aug 30 12:57:23 2005 +++ phpdoc-zh/reference/array/functions/array-diff-assoc.xml Thu Sep 1 11:35:33 2005 @@ -1,30 +1,29 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> - <refentry id="function.array-diff-assoc"> - <refnamediv> - <refname>array_diff_assoc</refname> - <refpurpose>´øË÷Òý¼ì²é¼ÆËãÊý×éµÄ²î¼¯</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>array</type><methodname>array_diff_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> - </methodsynopsis> - <para> - <function>array_diff_assoc</function> ·µ»ØÒ»¸ö - <type>array</type>£¬·µ»ØÒ»¸öÊý×飬¸ÃÊý×é°üÀ¨ÁËËùÓÐÔÚ - <parameter>array1</parameter> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ - <function>array_diff</function> ²»Í¬µÄÊǼüÃûÒ²ÓÃÓڱȽϡ£ - </para> - <para> - <example> - <title><function>array_diff_assoc</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.array-diff-assoc"> + <refnamediv> + <refname>array_diff_assoc</refname> + <refpurpose>´øË÷Òý¼ì²é¼ÆËãÊý×éµÄ²î¼¯</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>array</type><methodname>array_diff_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> + </methodsynopsis> + <para> + <function>array_diff_assoc</function> ·µ»ØÒ»¸öÊý×飬¸ÃÊý×é°üÀ¨ÁËËùÓÐÔÚ + <parameter>array1</parameter> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ + <function>array_diff</function> ²»Í¬µÄÊǼüÃûÒ²ÓÃÓڱȽϡ£ + </para> + <para> + <example> + <title><function>array_diff_assoc</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php $array1 = array ("a" => "green", "b" => "brown", "c" => "blue", "red"); @@ -32,9 +31,9 @@ $result = array_diff_assoc($array1, $array2); ?> ]]> - </programlisting> - &example.outputs; - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ Array ( @@ -43,34 +42,34 @@ [0] => red ) ]]> - </screen> - </example> - </para> - <simpara> - ÉÏÃæµÄÀý×ÓÖпÉÒÔ¿´µ½¼üÖµ¶Ô <literal>"a" => "green"</literal> - ÔÚÁ½¸öÊý×éÖж¼ÓУ¬Òò´Ë²»ÔÚ±¾º¯ÊýµÄÊä³öÖС£Óë´Ë²»Í¬£¬¼üÖµ¶Ô - <literal>0 => "red"</literal> ³öÏÖÔÚÊä³öÖÐÊÇÒòΪµÚ¶þ¸ö²ÎÊýÖÐµÄ - <literal>"red"</literal> µÄ¼üÃûÊÇ <literal>1</literal>¡£ - </simpara> - <simpara> - ¼üÖµ¶Ô <emphasis>key => value</emphasis> - ÖеÄÁ½¸öÖµ½öÔÚ <literal>(string) $elem1 === (string) - $elem2 </literal> ʱ±»ÈÏΪÏàµÈ¡£Ò²¾ÍÊÇ˵ʹÓÃÁËÑϸñ¼ì²é£¬×Ö·û´®µÄ±í´ï±ØÐëÏàͬ¡£ - <!-- TODO: example of it... --> - </simpara> - <note> - <simpara> - ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»¿ÉÒÔÓà - <literal>array_diff_assoc($array1[0], $array2[0]);</literal> - ¼ì²é¸üÉîµÄά¶È¡£ - </simpara> - </note> - <para> - ²Î¼û <function>array_diff</function>£¬<function>array_intersect</function> - ºÍ <function>array_intersect_assoc</function>¡£ - </para> - </refsect1> - </refentry> + </screen> + </example> + </para> + <simpara> + ÉÏÃæµÄÀý×ÓÖпÉÒÔ¿´µ½¼üÖµ¶Ô <literal>"a" => "green"</literal> + ÔÚÁ½¸öÊý×éÖж¼ÓУ¬Òò´Ë²»ÔÚ±¾º¯ÊýµÄÊä³öÖС£Óë´Ë²»Í¬£¬¼üÖµ¶Ô + <literal>0 => "red"</literal> ³öÏÖÔÚÊä³öÖÐÊÇÒòΪµÚ¶þ¸ö²ÎÊýÖÐµÄ + <literal>"red"</literal> µÄ¼üÃûÊÇ <literal>1</literal>¡£ + </simpara> + <simpara> + ¼üÖµ¶Ô <emphasis>key => value</emphasis> + ÖеÄÁ½¸öÖµ½öÔÚ <literal>(string) $elem1 === (string) + $elem2 </literal> ʱ±»ÈÏΪÏàµÈ¡£Ò²¾ÍÊÇ˵ʹÓÃÁËÑϸñ¼ì²é£¬×Ö·û´®µÄ±í´ï±ØÐëÏàͬ¡£ + <!-- TODO: example of it... --> + </simpara> + <note> + <simpara> + ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»¿ÉÒÔÓà + <literal>array_diff_assoc($array1[0], $array2[0]);</literal> + ¼ì²é¸üÉîµÄά¶È¡£ + </simpara> + </note> + <para> + ²Î¼û <function>array_diff</function>£¬<function>array_intersect</function> + ºÍ <function>array_intersect_assoc</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/array-diff-uassoc.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/array/functions/array-diff-uassoc.xml diff -u phpdoc-zh/reference/array/functions/array-diff-uassoc.xml:1.1 phpdoc-zh/reference/array/functions/array-diff-uassoc.xml:1.2 --- phpdoc-zh/reference/array/functions/array-diff-uassoc.xml:1.1 Tue Aug 30 12:57:23 2005 +++ phpdoc-zh/reference/array/functions/array-diff-uassoc.xml Thu Sep 1 11:35:33 2005 @@ -1,38 +1,35 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.7 Maintainer: dallas 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_assoc</function> ·µ»ØÒ»¸ö - <type>array</type>£¬·µ»ØÒ»¸öÊý×飬¸ÃÊý×é°üÀ¨ÁËËùÓÐÔÚ - <parameter>array1</parameter> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ - <function>array_diff</function> ²»Í¬µÄÊǼüÃûÒ²ÓÃÓڱȽϡ£ - </para> - <para> - ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ÕâºÍ - <function>array_diff_assoc</function> - ²»Í¬µÄÊÇ»¹Ê¹ÓÃÁ˱ȽÏË÷ÒýµÄÄÚ²¿º¯Êý¡£ - </para> - <para> - <example> - <title><function>array_diff_uassoc</function> Àý×Ó</title> - <programlisting role="php"> +<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> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ + <function>array_diff</function> ²»Í¬µÄÊǼüÃûÒ²ÓÃÓڱȽϡ£ + </para> + <para> + ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ÕâºÍ + <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) @@ -49,9 +46,9 @@ print_r($result); ?> ]]> - </programlisting> - &example.outputs; - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ Array ( @@ -60,33 +57,33 @@ [0] => red ) ]]> - </screen> - </example> - </para> - <simpara> - ÉÏÃæµÄÀý×ÓÖÐ <literal>"a" => "green"</literal> - ³öÏÖÔÚÁ½¸öÊý×éÖÐÒò´Ë²»ÔÚº¯ÊýµÄÊä³öÖС£µ«ÊÇ - <literal>0 => "red"</literal> È´ÔÚÊä³öÖУ¬ÒòΪµÚ¶þ¸ö²ÎÊýÖÐµÄ - <literal>"red"</literal> µÄ¼üÃûÊÇ <literal>1</literal>¡£ - </simpara> - <simpara> - Á½¸öË÷ÒýÊÇ·ñÏàͬÊÇÓÉÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´¼ì²éµÄ¡£ - </simpara> - <note> - <simpara> - ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»¿ÉÒÔÓà - <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> + </screen> + </example> + </para> + <simpara> + ÉÏÃæµÄÀý×ÓÖÐ <literal>"a" => "green"</literal> + ³öÏÖÔÚÁ½¸öÊý×éÖÐÒò´Ë²»ÔÚº¯ÊýµÄÊä³öÖС£µ«ÊÇ + <literal>0 => "red"</literal> È´ÔÚÊä³öÖУ¬ÒòΪµÚ¶þ¸ö²ÎÊýÖÐµÄ + <literal>"red"</literal> µÄ¼üÃûÊÇ <literal>1</literal>¡£ + </simpara> + <simpara> + Á½¸öË÷ÒýÊÇ·ñÏàͬÊÇÓÉÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´¼ì²éµÄ¡£ + </simpara> + <note> + <simpara> + ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»¿ÉÒÔÓà + <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: http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/array-diff-ukey.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/array/functions/array-diff-ukey.xml diff -u phpdoc-zh/reference/array/functions/array-diff-ukey.xml:1.1 phpdoc-zh/reference/array/functions/array-diff-ukey.xml:1.2 --- phpdoc-zh/reference/array/functions/array-diff-ukey.xml:1.1 Tue Aug 30 12:57:23 2005 +++ phpdoc-zh/reference/array/functions/array-diff-ukey.xml Thu Sep 1 11:35:33 2005 @@ -1,34 +1,34 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.3 Maintainer: dallas 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> - ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ - </para> - <para> - <example> - <title><function>array_diff_ukey</function> Àý×Ó</title> - <programlisting role="php"> +<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> + ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ + </para> + <para> + <example> + <title><function>array_diff_ukey</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php function key_compare_func($key1, $key2) @@ -47,9 +47,9 @@ var_dump(array_diff_ukey($array1, $array2, 'key_compare_func')); ?> ]]> - </programlisting> - &example.outputs; - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ array(2) { ["red"]=> @@ -58,24 +58,24 @@ int(4) } ]]> - </screen> - </example> - </para> - <note> - <simpara> - ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»£¬¿ÉÒÔÓà - <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> + </screen> + </example> + </para> + <note> + <simpara> + ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»£¬¿ÉÒÔÓà + <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: http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/array-intersect-assoc.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-zh/reference/array/functions/array-intersect-assoc.xml diff -u phpdoc-zh/reference/array/functions/array-intersect-assoc.xml:1.4 phpdoc-zh/reference/array/functions/array-intersect-assoc.xml:1.5 --- phpdoc-zh/reference/array/functions/array-intersect-assoc.xml:1.4 Thu Aug 25 13:04:29 2005 +++ phpdoc-zh/reference/array/functions/array-intersect-assoc.xml Thu Sep 1 11:35:33 2005 @@ -1,29 +1,29 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.8 Maintainer: dallas Status: ready --> - <refentry id="function.array-intersect-assoc"> - <refnamediv> - <refname>array_intersect_assoc</refname> - <refpurpose>´øË÷Òý¼ì²é¼ÆËãÊý×éµÄ½»¼¯</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>array</type><methodname>array_intersect_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> - </methodsynopsis> - <simpara> - <function>array_intersect_assoc</function> ·µ»ØÒ»¸öÊý×飬¸ÃÊý×é°üº¬ÁËËùÓÐÔÚ - <parameter>array1</parameter> ÖÐҲͬʱ³öÏÖÔÚËùÓÐÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ - <function>array__intersect</function> ²»Í¬µÄÊǼüÃûÒ²ÓÃÓڱȽϡ£ - </simpara> - <para> - <example> - <title><function>array_intersect_assoc</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.array-intersect-assoc"> + <refnamediv> + <refname>array_intersect_assoc</refname> + <refpurpose>´øË÷Òý¼ì²é¼ÆËãÊý×éµÄ½»¼¯</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>array</type><methodname>array_intersect_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> + </methodsynopsis> + <simpara> + <function>array_intersect_assoc</function> ·µ»ØÒ»¸öÊý×飬¸ÃÊý×é°üº¬ÁËËùÓÐÔÚ + <parameter>array1</parameter> ÖÐҲͬʱ³öÏÖÔÚËùÓÐÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ + <function>array_intersect</function> ²»Í¬µÄÊǼüÃûÒ²ÓÃÓڱȽϡ£ + </simpara> + <para> + <example> + <title><function>array_intersect_assoc</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); @@ -31,40 +31,40 @@ $result_array = array_intersect_assoc($array1, $array2); ?> ]]> - </programlisting> - <para> - $result_array ½«ÊÇ£º - </para> - <screen> + </programlisting> + <para> + $result_array ½«ÊÇ£º + </para> + <screen> <![CDATA[ Array ( [a] => green ) ]]> - </screen> - </example> - </para> - <simpara> - ÉÏÃæÀý×ÓÖпÉÒÔ¿´µ½Ö»ÓмüÖµ¶Ô <literal>"a" => - "green"</literal> ÔÚÁ½¸öÊý×éÖж¼´æÔÚ´Ó¶ø±»·µ»Ø¡£Öµ - <literal>"red"</literal> ûÓб»·µ»ØÊÇÒòΪÔÚ - <varname>$array1</varname> ÖÐËüµÄ¼üÃûÊÇ <literal>0</literal> - ¶øÔÚ <varname>$array2</varname> ÖÐ <literal>"red"</literal> - µÄ¼üÃûÊÇ <literal>1</literal>¡£ - </simpara> - <simpara> - ¼üÖµ¶Ô <emphasis>key => value</emphasis> - ÖеÄÁ½¸öÖµ½öÔÚ <literal>(string) $elem1 === (string) - $elem2 </literal> ʱ±»ÈÏΪÏàµÈ¡£Ò²¾ÍÊÇ˵ʹÓÃÁËÑϸñ¼ì²é£¬×Ö·û´®µÄ±í´ï±ØÐëÏàͬ¡£ - <!-- TODO: example of it... --> - </simpara> - <simpara> - ²Î¼û <function>array_intersect</function>£¬<function>array_uintersect_assoc</function>£¬<function>array_intersect_uassoc</function>£¬<function>array_uintersect_uassoc</function>£¬<function>array_diff</function> - ºÍ <function>array_diff_assoc</function>¡£ - </simpara> - </refsect1> - </refentry> + </screen> + </example> + </para> + <simpara> + ÉÏÃæÀý×ÓÖпÉÒÔ¿´µ½Ö»ÓмüÖµ¶Ô <literal>"a" => + "green"</literal> ÔÚÁ½¸öÊý×éÖж¼´æÔÚ´Ó¶ø±»·µ»Ø¡£Öµ + <literal>"red"</literal> ûÓб»·µ»ØÊÇÒòΪÔÚ + <varname>$array1</varname> ÖÐËüµÄ¼üÃûÊÇ <literal>0</literal> + ¶øÔÚ <varname>$array2</varname> ÖÐ <literal>"red"</literal> + µÄ¼üÃûÊÇ <literal>1</literal>¡£ + </simpara> + <simpara> + ¼üÖµ¶Ô <emphasis>key => value</emphasis> + ÖеÄÁ½¸öÖµ½öÔÚ <literal>(string) $elem1 === (string) + $elem2 </literal> ʱ±»ÈÏΪÏàµÈ¡£Ò²¾ÍÊÇ˵ʹÓÃÁËÑϸñ¼ì²é£¬×Ö·û´®µÄ±í´ï±ØÐëÏàͬ¡£ + <!-- TODO: example of it... --> + </simpara> + <simpara> + ²Î¼û <function>array_intersect</function>£¬<function>array_uintersect_assoc</function>£¬<function>array_intersect_uassoc</function>£¬<function>array_uintersect_uassoc</function>£¬<function>array_diff</function> + ºÍ <function>array_diff_assoc</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/array-intersect-key.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/array/functions/array-intersect-key.xml diff -u phpdoc-zh/reference/array/functions/array-intersect-key.xml:1.1 phpdoc-zh/reference/array/functions/array-intersect-key.xml:1.2 --- phpdoc-zh/reference/array/functions/array-intersect-key.xml:1.1 Tue Aug 30 12:57:23 2005 +++ phpdoc-zh/reference/array/functions/array-intersect-key.xml Thu Sep 1 11:35:33 2005 @@ -1,28 +1,28 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas 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"> +<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); @@ -31,9 +31,9 @@ var_dump(array_intersect_key($array1, $array2)); ?> ]]> - </programlisting> - &example.outputs; - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ array(2) { ["blue"]=> @@ -42,29 +42,29 @@ int(3) }) ]]> - </screen> - </example> - </para> - <para> - ÉÏÀýÖпÉÒÔ¿´µ½Ö»ÓÐ <literal>'blue'</literal> - ºÍ <literal>'green'</literal> Á½¸ö¼üÃû³öÏÖÔÚÁ½¸öÊý×éÖУ¬Òò´Ë±»·µ»Ø¡£´ËÍâ×¢Òâ - <literal>'blue'</literal> ºÍ <literal>'green'</literal> - µÄÖµÔÚÁ½¸öÊý×éÖÐÊDz»Í¬µÄ¡£µ«ÒòΪֻ¼ì²é¼üÃû£¬Òò´Ë»¹ÊÇÆ¥Åä¡£·µ»ØµÄÖµÖ»ÊÇ - <parameter>array1</parameter> Öеġ£ - </para> - <para> - ÔÚ <literal>key => value</literal> ¶ÔÖеÄÁ½¸ö¼üÃû½öÔÚ - <literal>(string) $key1 === (string) $key2 </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> + </screen> + </example> + </para> + <para> + ÉÏÀýÖпÉÒÔ¿´µ½Ö»ÓÐ <literal>'blue'</literal> + ºÍ <literal>'green'</literal> Á½¸ö¼üÃû³öÏÖÔÚÁ½¸öÊý×éÖУ¬Òò´Ë±»·µ»Ø¡£´ËÍâ×¢Òâ + <literal>'blue'</literal> ºÍ <literal>'green'</literal> + µÄÖµÔÚÁ½¸öÊý×éÖÐÊDz»Í¬µÄ¡£µ«ÒòΪֻ¼ì²é¼üÃû£¬Òò´Ë»¹ÊÇÆ¥Åä¡£·µ»ØµÄÖµÖ»ÊÇ + <parameter>array1</parameter> Öеġ£ + </para> + <para> + ÔÚ <literal>key => value</literal> ¶ÔÖеÄÁ½¸ö¼üÃû½öÔÚ + <literal>(string) $key1 === (string) $key2 </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: http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/array-walk.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc-zh/reference/array/functions/array-walk.xml diff -u phpdoc-zh/reference/array/functions/array-walk.xml:1.7 phpdoc-zh/reference/array/functions/array-walk.xml:1.8 --- phpdoc-zh/reference/array/functions/array-walk.xml:1.7 Thu Aug 25 15:04:04 2005 +++ phpdoc-zh/reference/array/functions/array-walk.xml Thu Sep 1 11:35:33 2005 @@ -1,13 +1,11 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.24 Maintainer: dallas Status: ready --> <refentry id="function.array-walk"> <refnamediv> <refname>array_walk</refname> - <refpurpose> - ¶ÔÊý×éÖеÄÿ¸ö³ÉÔ±Ó¦ÓÃÓû§º¯Êý - </refpurpose> + <refpurpose>¶ÔÊý×éÖеÄÿ¸ö³ÉÔ±Ó¦ÓÃÓû§º¯Êý</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> @@ -39,8 +37,8 @@ <note> <para> Èç¹û <parameter>funcname</parameter> ÐèÒªÖ±½Ó×÷ÓÃÓÚÊý×éÖеÄÖµ£¬Ôò¸ø - <parameter>funcname</parameter> µÄµÚÒ»¸ö²ÎÊýÖ¸¶¨Îª - <link linkend="language.references">reference</link>¡£ÕâÑùÈκζÔÕâЩµ¥ÔªµÄ¸Ä±äÒ²½«»á¸Ä±äÔʼÊý×é±¾Éí¡£ + <parameter>funcname</parameter> µÄµÚÒ»¸ö²ÎÊýÖ¸¶¨Îª<link + linkend="language.references">ÒýÓÃ</link>¡£ÕâÑùÈκζÔÕâЩµ¥ÔªµÄ¸Ä±äÒ²½«»á¸Ä±äÔʼÊý×é±¾Éí¡£ </para> </note> <note> http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/pos.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-zh/reference/array/functions/pos.xml diff -u phpdoc-zh/reference/array/functions/pos.xml:1.3 phpdoc-zh/reference/array/functions/pos.xml:1.4 --- phpdoc-zh/reference/array/functions/pos.xml:1.3 Tue Aug 30 12:57:23 2005 +++ phpdoc-zh/reference/array/functions/pos.xml Thu Sep 1 11:35:33 2005 @@ -1,18 +1,17 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> <refentry id="function.pos"> <refnamediv> <refname>pos</refname> - <refpurpose>&Alias; <function>current</function></refpurpose> + <refpurpose><function>current</function> µÄ&Alias;</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <simpara> - &info.function.alias; - <function>current</function> + &info.function.alias;<function>current</function>¡£ </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/sizeof.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-zh/reference/array/functions/sizeof.xml diff -u phpdoc-zh/reference/array/functions/sizeof.xml:1.6 phpdoc-zh/reference/array/functions/sizeof.xml:1.7 --- phpdoc-zh/reference/array/functions/sizeof.xml:1.6 Tue Aug 30 17:04:05 2005 +++ phpdoc-zh/reference/array/functions/sizeof.xml Thu Sep 1 11:35:33 2005 @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> <refentry id="function.sizeof"> - <refnamediv> - <refname>sizeof</refname> - <refpurpose><function>count</function> µÄ&Alias; </refpurpose> - </refnamediv> + <refnamediv> + <refname>sizeof</refname> + <refpurpose><function>count</function> µÄ&Alias; </refpurpose> + </refnamediv> - <refsect1 role="description"> - &reftitle.description; - <simpara> - &info.function.alias;<function>count</function>¡£ - </simpara> - </refsect1> + <refsect1 role="description"> + &reftitle.description; + <simpara> + &info.function.alias;<function>count</function>¡£ + </simpara> + </refsect1> </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/co.php/phpdoc-zh/reference/array/functions/array-intersect-uassoc.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-intersect-uassoc.xml +++ phpdoc-zh/reference/array/functions/array-intersect-uassoc.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas 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> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </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-zh/reference/array/functions/array-intersect-ukey.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-intersect-ukey.xml +++ phpdoc-zh/reference/array/functions/array-intersect-ukey.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.3 Maintainer: dallas 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> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </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> µÄÖµÔÚÁ½¸öÊý×éÖÐÊDz»Í¬µÄ¡£µ«ÒòΪֻ¼ì²é¼üÃû£¬Òò´Ë»¹ÊÇÆ¥Åä¡£·µ»ØµÄÖµÖ»ÊÇ <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-zh/reference/array/functions/array-product.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-product.xml +++ phpdoc-zh/reference/array/functions/array-product.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.1 Maintainer: dallas 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> ÒÔÕûÊý»ò¸¡µãÊý·µ»ØÒ»¸öÊý×éÖÐËùÓÐÖµµÄ³Ë»ý¡£ </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-zh/reference/array/functions/array-udiff-assoc.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-udiff-assoc.xml +++ phpdoc-zh/reference/array/functions/array-udiff-assoc.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.9 Maintainer: dallas 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> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ <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> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </simpara> <note> <simpara> ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»£¬¿ÉÒÔÓà <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-zh/reference/array/functions/array-udiff-uassoc.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-udiff-uassoc.xml +++ phpdoc-zh/reference/array/functions/array-udiff-uassoc.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.11 Maintainer: dallas 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> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ <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> ͬʱ³öÏÖÔÚÁ½¸öÊý×éÖУ¬Òò´Ë²»ÔÚ±¾º¯ÊýµÄÊä³öÖС£Òª¼Çס±ØÐëÌṩÁ½¸ö»Øµ÷º¯Êý¡£ </simpara> <simpara> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </simpara> <note> <simpara> ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»£¬¿ÉÒÔÓà <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-zh/reference/array/functions/array-udiff.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-udiff.xml +++ phpdoc-zh/reference/array/functions/array-udiff.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.10 Maintainer: dallas 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> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢Òâ¼üÃû±£³Ö²»±ä¡£Êý¾ÝµÄ±È½ÏÊÇÓà <parameter>data_compare_func</parameter> ½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ÕâºÍ <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> ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»£¬¿ÉÒÔÓà <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-zh/reference/array/functions/array-uintersect-assoc.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-uintersect-assoc.xml +++ phpdoc-zh/reference/array/functions/array-uintersect-assoc.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas 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> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </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-zh/reference/array/functions/array-uintersect-uassoc.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-uintersect-uassoc.xml +++ phpdoc-zh/reference/array/functions/array-uintersect-uassoc.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas 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> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </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-zh/reference/array/functions/array-uintersect.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-uintersect.xml +++ phpdoc-zh/reference/array/functions/array-uintersect.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas 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> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </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-zh/reference/array/functions/array-walk-recursive.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-walk-recursive.xml +++ phpdoc-zh/reference/array/functions/array-walk-recursive.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.8 Maintainer: dallas 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>funcname</parameter> Ó¦Óõ½ <parameter>array</parameter> Êý×éÖеÄÿ¸öµ¥Ôª¡£±¾º¯Êý»áµÝ¹éµ½¸üÉî²ãµÄÊý×éÖÐÈ¥¡£µäÐÍÇé¿öÏ <parameter>funcname</parameter> ½ÓÊÜÁ½¸ö²ÎÊý¡£<parameter>input</parameter> ²ÎÊýµÄÖµ×÷ΪµÚÒ»¸ö£¬¼üÃû×÷ΪµÚ¶þ¸ö¡£Èç¹ûÌṩÁË¿ÉÑ¡²ÎÊý <parameter>userdata</parameter>£¬½«±»×÷ΪµÚÈý¸ö²ÎÊý´«µÝ¸ø callback <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' ²¢Ã»ÓÐÏÔʾ³öÀ´¡£ÈÎºÎÆäֵΪÊý×éµÄ¼ü¶¼²»»á±»´«µÝµ½»Øµ÷º¯ÊýÖÐÈ¥¡£ </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/diff.php/phpdoc-zh/reference/array/functions/array-diff-assoc.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-zh/reference/array/functions/array-diff-assoc.xml diff -u phpdoc-zh/reference/array/functions/array-diff-assoc.xml:1.4 phpdoc-zh/reference/array/functions/array-diff-assoc.xml:1.5 --- phpdoc-zh/reference/array/functions/array-diff-assoc.xml:1.4 Tue Aug 30 12:57:23 2005 +++ phpdoc-zh/reference/array/functions/array-diff-assoc.xml Thu Sep 1 11:35:33 2005 @@ -1,30 +1,29 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.5 Maintainer: dallas Status: ready --> - <refentry id="function.array-diff-assoc"> - <refnamediv> - <refname>array_diff_assoc</refname> - <refpurpose>´øË÷Òý¼ì²é¼ÆËãÊý×éµÄ²î¼¯</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>array</type><methodname>array_diff_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> - </methodsynopsis> - <para> - <function>array_diff_assoc</function> ·µ»ØÒ»¸ö - <type>array</type>£¬·µ»ØÒ»¸öÊý×飬¸ÃÊý×é°üÀ¨ÁËËùÓÐÔÚ - <parameter>array1</parameter> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ - <function>array_diff</function> ²»Í¬µÄÊǼüÃûÒ²ÓÃÓڱȽϡ£ - </para> - <para> - <example> - <title><function>array_diff_assoc</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.array-diff-assoc"> + <refnamediv> + <refname>array_diff_assoc</refname> + <refpurpose>´øË÷Òý¼ì²é¼ÆËãÊý×éµÄ²î¼¯</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>array</type><methodname>array_diff_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> + </methodsynopsis> + <para> + <function>array_diff_assoc</function> ·µ»ØÒ»¸öÊý×飬¸ÃÊý×é°üÀ¨ÁËËùÓÐÔÚ + <parameter>array1</parameter> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ + <function>array_diff</function> ²»Í¬µÄÊǼüÃûÒ²ÓÃÓڱȽϡ£ + </para> + <para> + <example> + <title><function>array_diff_assoc</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php $array1 = array ("a" => "green", "b" => "brown", "c" => "blue", "red"); @@ -32,9 +31,9 @@ $result = array_diff_assoc($array1, $array2); ?> ]]> - </programlisting> - &example.outputs; - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ Array ( @@ -43,34 +42,34 @@ [0] => red ) ]]> - </screen> - </example> - </para> - <simpara> - ÉÏÃæµÄÀý×ÓÖпÉÒÔ¿´µ½¼üÖµ¶Ô <literal>"a" => "green"</literal> - ÔÚÁ½¸öÊý×éÖж¼ÓУ¬Òò´Ë²»ÔÚ±¾º¯ÊýµÄÊä³öÖС£Óë´Ë²»Í¬£¬¼üÖµ¶Ô - <literal>0 => "red"</literal> ³öÏÖÔÚÊä³öÖÐÊÇÒòΪµÚ¶þ¸ö²ÎÊýÖÐµÄ - <literal>"red"</literal> µÄ¼üÃûÊÇ <literal>1</literal>¡£ - </simpara> - <simpara> - ¼üÖµ¶Ô <emphasis>key => value</emphasis> - ÖеÄÁ½¸öÖµ½öÔÚ <literal>(string) $elem1 === (string) - $elem2 </literal> ʱ±»ÈÏΪÏàµÈ¡£Ò²¾ÍÊÇ˵ʹÓÃÁËÑϸñ¼ì²é£¬×Ö·û´®µÄ±í´ï±ØÐëÏàͬ¡£ - <!-- TODO: example of it... --> - </simpara> - <note> - <simpara> - ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»¿ÉÒÔÓà - <literal>array_diff_assoc($array1[0], $array2[0]);</literal> - ¼ì²é¸üÉîµÄά¶È¡£ - </simpara> - </note> - <para> - ²Î¼û <function>array_diff</function>£¬<function>array_intersect</function> - ºÍ <function>array_intersect_assoc</function>¡£ - </para> - </refsect1> - </refentry> + </screen> + </example> + </para> + <simpara> + ÉÏÃæµÄÀý×ÓÖпÉÒÔ¿´µ½¼üÖµ¶Ô <literal>"a" => "green"</literal> + ÔÚÁ½¸öÊý×éÖж¼ÓУ¬Òò´Ë²»ÔÚ±¾º¯ÊýµÄÊä³öÖС£Óë´Ë²»Í¬£¬¼üÖµ¶Ô + <literal>0 => "red"</literal> ³öÏÖÔÚÊä³öÖÐÊÇÒòΪµÚ¶þ¸ö²ÎÊýÖÐµÄ + <literal>"red"</literal> µÄ¼üÃûÊÇ <literal>1</literal>¡£ + </simpara> + <simpara> + ¼üÖµ¶Ô <emphasis>key => value</emphasis> + ÖеÄÁ½¸öÖµ½öÔÚ <literal>(string) $elem1 === (string) + $elem2 </literal> ʱ±»ÈÏΪÏàµÈ¡£Ò²¾ÍÊÇ˵ʹÓÃÁËÑϸñ¼ì²é£¬×Ö·û´®µÄ±í´ï±ØÐëÏàͬ¡£ + <!-- TODO: example of it... --> + </simpara> + <note> + <simpara> + ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»¿ÉÒÔÓà + <literal>array_diff_assoc($array1[0], $array2[0]);</literal> + ¼ì²é¸üÉîµÄά¶È¡£ + </simpara> + </note> + <para> + ²Î¼û <function>array_diff</function>£¬<function>array_intersect</function> + ºÍ <function>array_intersect_assoc</function>¡£ + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/array-diff-uassoc.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/array/functions/array-diff-uassoc.xml diff -u phpdoc-zh/reference/array/functions/array-diff-uassoc.xml:1.1 phpdoc-zh/reference/array/functions/array-diff-uassoc.xml:1.2 --- phpdoc-zh/reference/array/functions/array-diff-uassoc.xml:1.1 Tue Aug 30 12:57:23 2005 +++ phpdoc-zh/reference/array/functions/array-diff-uassoc.xml Thu Sep 1 11:35:33 2005 @@ -1,38 +1,35 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.7 Maintainer: dallas 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_assoc</function> ·µ»ØÒ»¸ö - <type>array</type>£¬·µ»ØÒ»¸öÊý×飬¸ÃÊý×é°üÀ¨ÁËËùÓÐÔÚ - <parameter>array1</parameter> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ - <function>array_diff</function> ²»Í¬µÄÊǼüÃûÒ²ÓÃÓڱȽϡ£ - </para> - <para> - ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ÕâºÍ - <function>array_diff_assoc</function> - ²»Í¬µÄÊÇ»¹Ê¹ÓÃÁ˱ȽÏË÷ÒýµÄÄÚ²¿º¯Êý¡£ - </para> - <para> - <example> - <title><function>array_diff_uassoc</function> Àý×Ó</title> - <programlisting role="php"> +<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> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ + <function>array_diff</function> ²»Í¬µÄÊǼüÃûÒ²ÓÃÓڱȽϡ£ + </para> + <para> + ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ÕâºÍ + <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) @@ -49,9 +46,9 @@ print_r($result); ?> ]]> - </programlisting> - &example.outputs; - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ Array ( @@ -60,33 +57,33 @@ [0] => red ) ]]> - </screen> - </example> - </para> - <simpara> - ÉÏÃæµÄÀý×ÓÖÐ <literal>"a" => "green"</literal> - ³öÏÖÔÚÁ½¸öÊý×éÖÐÒò´Ë²»ÔÚº¯ÊýµÄÊä³öÖС£µ«ÊÇ - <literal>0 => "red"</literal> È´ÔÚÊä³öÖУ¬ÒòΪµÚ¶þ¸ö²ÎÊýÖÐµÄ - <literal>"red"</literal> µÄ¼üÃûÊÇ <literal>1</literal>¡£ - </simpara> - <simpara> - Á½¸öË÷ÒýÊÇ·ñÏàͬÊÇÓÉÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´¼ì²éµÄ¡£ - </simpara> - <note> - <simpara> - ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»¿ÉÒÔÓà - <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> + </screen> + </example> + </para> + <simpara> + ÉÏÃæµÄÀý×ÓÖÐ <literal>"a" => "green"</literal> + ³öÏÖÔÚÁ½¸öÊý×éÖÐÒò´Ë²»ÔÚº¯ÊýµÄÊä³öÖС£µ«ÊÇ + <literal>0 => "red"</literal> È´ÔÚÊä³öÖУ¬ÒòΪµÚ¶þ¸ö²ÎÊýÖÐµÄ + <literal>"red"</literal> µÄ¼üÃûÊÇ <literal>1</literal>¡£ + </simpara> + <simpara> + Á½¸öË÷ÒýÊÇ·ñÏàͬÊÇÓÉÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´¼ì²éµÄ¡£ + </simpara> + <note> + <simpara> + ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»¿ÉÒÔÓà + <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: http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/array-diff-ukey.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/array/functions/array-diff-ukey.xml diff -u phpdoc-zh/reference/array/functions/array-diff-ukey.xml:1.1 phpdoc-zh/reference/array/functions/array-diff-ukey.xml:1.2 --- phpdoc-zh/reference/array/functions/array-diff-ukey.xml:1.1 Tue Aug 30 12:57:23 2005 +++ phpdoc-zh/reference/array/functions/array-diff-ukey.xml Thu Sep 1 11:35:33 2005 @@ -1,34 +1,34 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.3 Maintainer: dallas 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> - ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ - </para> - <para> - <example> - <title><function>array_diff_ukey</function> Àý×Ó</title> - <programlisting role="php"> +<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> + ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ + </para> + <para> + <example> + <title><function>array_diff_ukey</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php function key_compare_func($key1, $key2) @@ -47,9 +47,9 @@ var_dump(array_diff_ukey($array1, $array2, 'key_compare_func')); ?> ]]> - </programlisting> - &example.outputs; - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ array(2) { ["red"]=> @@ -58,24 +58,24 @@ int(4) } ]]> - </screen> - </example> - </para> - <note> - <simpara> - ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»£¬¿ÉÒÔÓà - <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> + </screen> + </example> + </para> + <note> + <simpara> + ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»£¬¿ÉÒÔÓà + <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: http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/array-intersect-assoc.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-zh/reference/array/functions/array-intersect-assoc.xml diff -u phpdoc-zh/reference/array/functions/array-intersect-assoc.xml:1.4 phpdoc-zh/reference/array/functions/array-intersect-assoc.xml:1.5 --- phpdoc-zh/reference/array/functions/array-intersect-assoc.xml:1.4 Thu Aug 25 13:04:29 2005 +++ phpdoc-zh/reference/array/functions/array-intersect-assoc.xml Thu Sep 1 11:35:33 2005 @@ -1,29 +1,29 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.8 Maintainer: dallas Status: ready --> - <refentry id="function.array-intersect-assoc"> - <refnamediv> - <refname>array_intersect_assoc</refname> - <refpurpose>´øË÷Òý¼ì²é¼ÆËãÊý×éµÄ½»¼¯</refpurpose> - </refnamediv> - <refsect1> - <title>˵Ã÷</title> - <methodsynopsis> - <type>array</type><methodname>array_intersect_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> - </methodsynopsis> - <simpara> - <function>array_intersect_assoc</function> ·µ»ØÒ»¸öÊý×飬¸ÃÊý×é°üº¬ÁËËùÓÐÔÚ - <parameter>array1</parameter> ÖÐҲͬʱ³öÏÖÔÚËùÓÐÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ - <function>array__intersect</function> ²»Í¬µÄÊǼüÃûÒ²ÓÃÓڱȽϡ£ - </simpara> - <para> - <example> - <title><function>array_intersect_assoc</function> Àý×Ó</title> - <programlisting role="php"> +<refentry id="function.array-intersect-assoc"> + <refnamediv> + <refname>array_intersect_assoc</refname> + <refpurpose>´øË÷Òý¼ì²é¼ÆËãÊý×éµÄ½»¼¯</refpurpose> + </refnamediv> + <refsect1> + <title>˵Ã÷</title> + <methodsynopsis> + <type>array</type><methodname>array_intersect_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> + </methodsynopsis> + <simpara> + <function>array_intersect_assoc</function> ·µ»ØÒ»¸öÊý×飬¸ÃÊý×é°üº¬ÁËËùÓÐÔÚ + <parameter>array1</parameter> ÖÐҲͬʱ³öÏÖÔÚËùÓÐÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ + <function>array_intersect</function> ²»Í¬µÄÊǼüÃûÒ²ÓÃÓڱȽϡ£ + </simpara> + <para> + <example> + <title><function>array_intersect_assoc</function> Àý×Ó</title> + <programlisting role="php"> <![CDATA[ <?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); @@ -31,40 +31,40 @@ $result_array = array_intersect_assoc($array1, $array2); ?> ]]> - </programlisting> - <para> - $result_array ½«ÊÇ£º - </para> - <screen> + </programlisting> + <para> + $result_array ½«ÊÇ£º + </para> + <screen> <![CDATA[ Array ( [a] => green ) ]]> - </screen> - </example> - </para> - <simpara> - ÉÏÃæÀý×ÓÖпÉÒÔ¿´µ½Ö»ÓмüÖµ¶Ô <literal>"a" => - "green"</literal> ÔÚÁ½¸öÊý×éÖж¼´æÔÚ´Ó¶ø±»·µ»Ø¡£Öµ - <literal>"red"</literal> ûÓб»·µ»ØÊÇÒòΪÔÚ - <varname>$array1</varname> ÖÐËüµÄ¼üÃûÊÇ <literal>0</literal> - ¶øÔÚ <varname>$array2</varname> ÖÐ <literal>"red"</literal> - µÄ¼üÃûÊÇ <literal>1</literal>¡£ - </simpara> - <simpara> - ¼üÖµ¶Ô <emphasis>key => value</emphasis> - ÖеÄÁ½¸öÖµ½öÔÚ <literal>(string) $elem1 === (string) - $elem2 </literal> ʱ±»ÈÏΪÏàµÈ¡£Ò²¾ÍÊÇ˵ʹÓÃÁËÑϸñ¼ì²é£¬×Ö·û´®µÄ±í´ï±ØÐëÏàͬ¡£ - <!-- TODO: example of it... --> - </simpara> - <simpara> - ²Î¼û <function>array_intersect</function>£¬<function>array_uintersect_assoc</function>£¬<function>array_intersect_uassoc</function>£¬<function>array_uintersect_uassoc</function>£¬<function>array_diff</function> - ºÍ <function>array_diff_assoc</function>¡£ - </simpara> - </refsect1> - </refentry> + </screen> + </example> + </para> + <simpara> + ÉÏÃæÀý×ÓÖпÉÒÔ¿´µ½Ö»ÓмüÖµ¶Ô <literal>"a" => + "green"</literal> ÔÚÁ½¸öÊý×éÖж¼´æÔÚ´Ó¶ø±»·µ»Ø¡£Öµ + <literal>"red"</literal> ûÓб»·µ»ØÊÇÒòΪÔÚ + <varname>$array1</varname> ÖÐËüµÄ¼üÃûÊÇ <literal>0</literal> + ¶øÔÚ <varname>$array2</varname> ÖÐ <literal>"red"</literal> + µÄ¼üÃûÊÇ <literal>1</literal>¡£ + </simpara> + <simpara> + ¼üÖµ¶Ô <emphasis>key => value</emphasis> + ÖеÄÁ½¸öÖµ½öÔÚ <literal>(string) $elem1 === (string) + $elem2 </literal> ʱ±»ÈÏΪÏàµÈ¡£Ò²¾ÍÊÇ˵ʹÓÃÁËÑϸñ¼ì²é£¬×Ö·û´®µÄ±í´ï±ØÐëÏàͬ¡£ + <!-- TODO: example of it... --> + </simpara> + <simpara> + ²Î¼û <function>array_intersect</function>£¬<function>array_uintersect_assoc</function>£¬<function>array_intersect_uassoc</function>£¬<function>array_uintersect_uassoc</function>£¬<function>array_diff</function> + ºÍ <function>array_diff_assoc</function>¡£ + </simpara> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/array-intersect-key.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-zh/reference/array/functions/array-intersect-key.xml diff -u phpdoc-zh/reference/array/functions/array-intersect-key.xml:1.1 phpdoc-zh/reference/array/functions/array-intersect-key.xml:1.2 --- phpdoc-zh/reference/array/functions/array-intersect-key.xml:1.1 Tue Aug 30 12:57:23 2005 +++ phpdoc-zh/reference/array/functions/array-intersect-key.xml Thu Sep 1 11:35:33 2005 @@ -1,28 +1,28 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.2 Maintainer: dallas 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"> +<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); @@ -31,9 +31,9 @@ var_dump(array_intersect_key($array1, $array2)); ?> ]]> - </programlisting> - &example.outputs; - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ array(2) { ["blue"]=> @@ -42,29 +42,29 @@ int(3) }) ]]> - </screen> - </example> - </para> - <para> - ÉÏÀýÖпÉÒÔ¿´µ½Ö»ÓÐ <literal>'blue'</literal> - ºÍ <literal>'green'</literal> Á½¸ö¼üÃû³öÏÖÔÚÁ½¸öÊý×éÖУ¬Òò´Ë±»·µ»Ø¡£´ËÍâ×¢Òâ - <literal>'blue'</literal> ºÍ <literal>'green'</literal> - µÄÖµÔÚÁ½¸öÊý×éÖÐÊDz»Í¬µÄ¡£µ«ÒòΪֻ¼ì²é¼üÃû£¬Òò´Ë»¹ÊÇÆ¥Åä¡£·µ»ØµÄÖµÖ»ÊÇ - <parameter>array1</parameter> Öеġ£ - </para> - <para> - ÔÚ <literal>key => value</literal> ¶ÔÖеÄÁ½¸ö¼üÃû½öÔÚ - <literal>(string) $key1 === (string) $key2 </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> + </screen> + </example> + </para> + <para> + ÉÏÀýÖпÉÒÔ¿´µ½Ö»ÓÐ <literal>'blue'</literal> + ºÍ <literal>'green'</literal> Á½¸ö¼üÃû³öÏÖÔÚÁ½¸öÊý×éÖУ¬Òò´Ë±»·µ»Ø¡£´ËÍâ×¢Òâ + <literal>'blue'</literal> ºÍ <literal>'green'</literal> + µÄÖµÔÚÁ½¸öÊý×éÖÐÊDz»Í¬µÄ¡£µ«ÒòΪֻ¼ì²é¼üÃû£¬Òò´Ë»¹ÊÇÆ¥Åä¡£·µ»ØµÄÖµÖ»ÊÇ + <parameter>array1</parameter> Öеġ£ + </para> + <para> + ÔÚ <literal>key => value</literal> ¶ÔÖеÄÁ½¸ö¼üÃû½öÔÚ + <literal>(string) $key1 === (string) $key2 </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: http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/array-walk.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc-zh/reference/array/functions/array-walk.xml diff -u phpdoc-zh/reference/array/functions/array-walk.xml:1.7 phpdoc-zh/reference/array/functions/array-walk.xml:1.8 --- phpdoc-zh/reference/array/functions/array-walk.xml:1.7 Thu Aug 25 15:04:04 2005 +++ phpdoc-zh/reference/array/functions/array-walk.xml Thu Sep 1 11:35:33 2005 @@ -1,13 +1,11 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.24 Maintainer: dallas Status: ready --> <refentry id="function.array-walk"> <refnamediv> <refname>array_walk</refname> - <refpurpose> - ¶ÔÊý×éÖеÄÿ¸ö³ÉÔ±Ó¦ÓÃÓû§º¯Êý - </refpurpose> + <refpurpose>¶ÔÊý×éÖеÄÿ¸ö³ÉÔ±Ó¦ÓÃÓû§º¯Êý</refpurpose> </refnamediv> <refsect1> <title>˵Ã÷</title> @@ -39,8 +37,8 @@ <note> <para> Èç¹û <parameter>funcname</parameter> ÐèÒªÖ±½Ó×÷ÓÃÓÚÊý×éÖеÄÖµ£¬Ôò¸ø - <parameter>funcname</parameter> µÄµÚÒ»¸ö²ÎÊýÖ¸¶¨Îª - <link linkend="language.references">reference</link>¡£ÕâÑùÈκζÔÕâЩµ¥ÔªµÄ¸Ä±äÒ²½«»á¸Ä±äÔʼÊý×é±¾Éí¡£ + <parameter>funcname</parameter> µÄµÚÒ»¸ö²ÎÊýÖ¸¶¨Îª<link + linkend="language.references">ÒýÓÃ</link>¡£ÕâÑùÈκζÔÕâЩµ¥ÔªµÄ¸Ä±äÒ²½«»á¸Ä±äÔʼÊý×é±¾Éí¡£ </para> </note> <note> http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/pos.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-zh/reference/array/functions/pos.xml diff -u phpdoc-zh/reference/array/functions/pos.xml:1.3 phpdoc-zh/reference/array/functions/pos.xml:1.4 --- phpdoc-zh/reference/array/functions/pos.xml:1.3 Tue Aug 30 12:57:23 2005 +++ phpdoc-zh/reference/array/functions/pos.xml Thu Sep 1 11:35:33 2005 @@ -1,18 +1,17 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> <refentry id="function.pos"> <refnamediv> <refname>pos</refname> - <refpurpose>&Alias; <function>current</function></refpurpose> + <refpurpose><function>current</function> µÄ&Alias;</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <simpara> - &info.function.alias; - <function>current</function> + &info.function.alias;<function>current</function>¡£ </simpara> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-zh/reference/array/functions/sizeof.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-zh/reference/array/functions/sizeof.xml diff -u phpdoc-zh/reference/array/functions/sizeof.xml:1.6 phpdoc-zh/reference/array/functions/sizeof.xml:1.7 --- phpdoc-zh/reference/array/functions/sizeof.xml:1.6 Tue Aug 30 17:04:05 2005 +++ phpdoc-zh/reference/array/functions/sizeof.xml Thu Sep 1 11:35:33 2005 @@ -1,19 +1,19 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> <refentry id="function.sizeof"> - <refnamediv> - <refname>sizeof</refname> - <refpurpose><function>count</function> µÄ&Alias; </refpurpose> - </refnamediv> + <refnamediv> + <refname>sizeof</refname> + <refpurpose><function>count</function> µÄ&Alias; </refpurpose> + </refnamediv> - <refsect1 role="description"> - &reftitle.description; - <simpara> - &info.function.alias;<function>count</function>¡£ - </simpara> - </refsect1> + <refsect1 role="description"> + &reftitle.description; + <simpara> + &info.function.alias;<function>count</function>¡£ + </simpara> + </refsect1> </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/co.php/phpdoc-zh/reference/array/functions/array-intersect-uassoc.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-intersect-uassoc.xml +++ phpdoc-zh/reference/array/functions/array-intersect-uassoc.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas 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> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </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-zh/reference/array/functions/array-intersect-ukey.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-intersect-ukey.xml +++ phpdoc-zh/reference/array/functions/array-intersect-ukey.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.3 Maintainer: dallas 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> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </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> µÄÖµÔÚÁ½¸öÊý×éÖÐÊDz»Í¬µÄ¡£µ«ÒòΪֻ¼ì²é¼üÃû£¬Òò´Ë»¹ÊÇÆ¥Åä¡£·µ»ØµÄÖµÖ»ÊÇ <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-zh/reference/array/functions/array-product.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-product.xml +++ phpdoc-zh/reference/array/functions/array-product.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.1 Maintainer: dallas 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> ÒÔÕûÊý»ò¸¡µãÊý·µ»ØÒ»¸öÊý×éÖÐËùÓÐÖµµÄ³Ë»ý¡£ </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-zh/reference/array/functions/array-udiff-assoc.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-udiff-assoc.xml +++ phpdoc-zh/reference/array/functions/array-udiff-assoc.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.9 Maintainer: dallas 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> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ <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> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </simpara> <note> <simpara> ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»£¬¿ÉÒÔÓà <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-zh/reference/array/functions/array-udiff-uassoc.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-udiff-uassoc.xml +++ phpdoc-zh/reference/array/functions/array-udiff-uassoc.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.11 Maintainer: dallas 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> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢ÒâºÍ <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> ͬʱ³öÏÖÔÚÁ½¸öÊý×éÖУ¬Òò´Ë²»ÔÚ±¾º¯ÊýµÄÊä³öÖС£Òª¼Çס±ØÐëÌṩÁ½¸ö»Øµ÷º¯Êý¡£ </simpara> <simpara> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </simpara> <note> <simpara> ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»£¬¿ÉÒÔÓà <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-zh/reference/array/functions/array-udiff.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-udiff.xml +++ phpdoc-zh/reference/array/functions/array-udiff.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.10 Maintainer: dallas 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> Öе«ÊDz»ÔÚÈÎºÎÆäËü²ÎÊýÊý×éÖеÄÖµ¡£×¢Òâ¼üÃû±£³Ö²»±ä¡£Êý¾ÝµÄ±È½ÏÊÇÓà <parameter>data_compare_func</parameter> ½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ÕâºÍ <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> ×¢Òâ±¾º¯ÊýÖ»¼ì²éÁ˶àάÊý×éÖеÄһά¡£µ±È»£¬¿ÉÒÔÓà <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-zh/reference/array/functions/array-uintersect-assoc.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-uintersect-assoc.xml +++ phpdoc-zh/reference/array/functions/array-uintersect-assoc.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas 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> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </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-zh/reference/array/functions/array-uintersect-uassoc.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-uintersect-uassoc.xml +++ phpdoc-zh/reference/array/functions/array-uintersect-uassoc.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas 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> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </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-zh/reference/array/functions/array-uintersect.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-uintersect.xml +++ phpdoc-zh/reference/array/functions/array-uintersect.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.4 Maintainer: dallas 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> ´Ë±È½ÏÊÇͨ¹ýÓû§ÌṩµÄ»Øµ÷º¯ÊýÀ´½øÐеġ£Èç¹ûÈÏΪµÚÒ»¸ö²ÎÊýСÓÚ£¬µÈÓÚ£¬»ò´óÓÚµÚ¶þ¸ö²ÎÊýʱ±ØÐë·Ö±ð·µ»ØÒ»¸öСÓÚÁ㣬µÈÓÚÁ㣬»ò´óÓÚÁãµÄÕûÊý¡£ </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-zh/reference/array/functions/array-walk-recursive.xml?r=1.1&p=1 Index: phpdoc-zh/reference/array/functions/array-walk-recursive.xml +++ phpdoc-zh/reference/array/functions/array-walk-recursive.xml <?xml version="1.0" encoding="gb2312"?> <!-- $Revision: 1.1 $ --> <!-- $Author: dallas $ --> <!-- EN-Revision: 1.8 Maintainer: dallas 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>funcname</parameter> Ó¦Óõ½ <parameter>array</parameter> Êý×éÖеÄÿ¸öµ¥Ôª¡£±¾º¯Êý»áµÝ¹éµ½¸üÉî²ãµÄÊý×éÖÐÈ¥¡£µäÐÍÇé¿öÏ <parameter>funcname</parameter> ½ÓÊÜÁ½¸ö²ÎÊý¡£<parameter>input</parameter> ²ÎÊýµÄÖµ×÷ΪµÚÒ»¸ö£¬¼üÃû×÷ΪµÚ¶þ¸ö¡£Èç¹ûÌṩÁË¿ÉÑ¡²ÎÊý <parameter>userdata</parameter>£¬½«±»×÷ΪµÚÈý¸ö²ÎÊý´«µÝ¸ø callback <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' ²¢Ã»ÓÐÏÔʾ³öÀ´¡£ÈÎºÎÆäֵΪÊý×éµÄ¼ü¶¼²»»á±»´«µÝµ½»Øµ÷º¯ÊýÖÐÈ¥¡£ </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 -->