1
0
mirror of https://github.com/php/doc-ja.git synced 2026-03-24 07:02:08 +01:00
Files
archived-doc-ja/reference/array/functions/array-intersect-uassoc.xml
KOSEKI Kengo dfc1eb9cb4 Add sort.callback.description entity (#85)
* Add sort.callback.description entity and restore the caution

This caution was removed from usort() document at 663a376446 . Add literal tags to the original.

* Replace the description of sort callback function to the entity

* Add emphasis tag to the caution

Co-authored-by: Yoshinari Takaoka <mumumu@mumumu.org>

---------

Co-authored-by: Yoshinari Takaoka <mumumu@mumumu.org>
2023-03-25 13:08:29 +09:00

128 lines
3.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 2226ad08fd93e3979efbba47c5ae3545eec97d25 Maintainer: takagi Status: ready -->
<refentry xml:id="function.array-intersect-uassoc" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>array_intersect_uassoc</refname>
<refpurpose>追加された添字の確認も含め、コールバック関数を用いて
配列の共通項を確認する</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>array_intersect_uassoc</methodname>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
<methodparam rep="repeat"><type>array</type><parameter>arrays</parameter></methodparam>
<methodparam><type>callable</type><parameter>key_compare_func</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_intersect_uassoc</function> は、全ての引数に現れる
<parameter>array</parameter> の全ての値を含む配列を返します。
<function>array_intersect</function> と異なり、
キーが比較に使用されることに注意してください。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>array</parameter></term>
<listitem>
<para>
比較元となる最初の配列。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>arrays</parameter></term>
<listitem>
<para>
キーを比較する対象となる配列。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>key_compare_func</parameter></term>
<listitem>
&sort.callback.description;
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
<parameter>array</parameter> の値のうち、
すべての引数に存在するもののみを返します。
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<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>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>array_intersect</function></member>
<member><function>array_intersect_assoc</function></member>
<member><function>array_uintersect_assoc</function></member>
<member><function>array_uintersect_uassoc</function></member>
<member><function>array_intersect_key</function></member>
<member><function>array_intersect_ukey</function></member>
</simplelist>
</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:"~/.phpdoc/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
-->