cvs: phpdoc-kr /reference/array/functions array-change-key-case.xml array-chunk.xml array-diff-assoc.xml array-diff.xml array-fill.xml
/reference/pcre pattern.modifiers.xml pattern.syntax.xml /reference/strings/functions get-html-translation-table.xml

From: Date: Mon, 08 Dec 2008 02:11:18 +0000
Subject: cvs: phpdoc-kr /reference/array/functions array-change-key-case.xml array-chunk.xml array-diff-assoc.xml array-diff.xml array-fill.xml
/reference/pcre pattern.modifiers.xml pattern.syntax.xml /reference/strings/functions get-html-translation-table.xml
Groups: php.doc.kr 
Request: Send a blank email to doc-kr+get-807@lists.php.net to get a copy of this message
progcom Mon Dec 8 02:11:18 2008 UTC Modified files: /phpdoc-kr/reference/array/functions array-change-key-case.xml array-chunk.xml array-diff-assoc.xml array-diff.xml array-fill.xml /phpdoc-kr/reference/pcre pattern.modifiers.xml pattern.syntax.xml /phpdoc-kr/reference/strings/functions get-html-translation-table.xml Log: sync

http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/array/functions/array-change-key-case.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc-kr/reference/array/functions/array-change-key-case.xml diff -u phpdoc-kr/reference/array/functions/array-change-key-case.xml:1.4 phpdoc-kr/reference/array/functions/array-change-key-case.xml:1.5 --- phpdoc-kr/reference/array/functions/array-change-key-case.xml:1.4 Sun Nov 9 18:31:46 2008 +++ phpdoc-kr/reference/array/functions/array-change-key-case.xml Mon Dec 8 02:11:17 2008 @@ -1,40 +1,83 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.10 Maintainer: fuzzy74 Status: unknown --> - <refentry xml:id="function.array-change-key-case" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>array_change_key_case</refname> - <refpurpose>모두 대문자나 소문자화된 문자열 키를 갖는 배열로 반환한다</refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>array</type><methodname>array_change_key_case</methodname> - <methodparam><type>array</type><parameter>input</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>case</parameter></methodparam> - </methodsynopsis> - <para> - <function>array_change_key_case</function>는 - <parameter>input</parameter> 배열 안의 키를 모두 소문자나 대문자로 변경한다. - 변경은 마지막 선택적인 <parameter>case</parameter> 인수에 의해 결정된다. - 그 인수에 <constant>CASE_UPPER</constant> 와 - <constant>CASE_LOWER</constant> 두 가지 상수를 전달할수 있다. - 기본값은 <constant>CASE_LOWER</constant> 이다. 이 함수는 숫자키는 그대로 - 두게 된다. - </para> - <example> - <title><function>array_change_key_case</function> 예제코드</title> - <programlisting role="php"> +<!-- EN-Revision: 1.14 Maintainer: progcom Status: ready --> +<refentry xml:id="function.array-change-key-case" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>array_change_key_case</refname> + <refpurpose>배열 안의 모든 키를 변경</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>array</type><methodname>array_change_key_case</methodname> + <methodparam><type>array</type><parameter>input</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>case</parameter></methodparam> + </methodsynopsis> + <para> + <parameter>input</parameter>에서 모든 키를 소문자나 대문자로 바꾼 배열을 + 반환합니다. 숫자 인덱스는 그대로 남습니다. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + + <varlistentry> + <term><parameter>input</parameter></term> + <listitem> + <para> + 작업할 배열 + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>case</parameter></term> + <listitem> + <para> + <constant>CASE_UPPER</constant>나 + <constant>CASE_LOWER</constant>(기본값) + </para> + </listitem> + </varlistentry> + + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 키를 소문자나 대문자로 바꾼 배열을 반환합니다. + <parameter>input</parameter>이 배열이 아니면 false를 반환합니다. + </para> + </refsect1> + + <refsect1 role="errors"> + &reftitle.errors; + <para> + <parameter>input</parameter>이 배열이 아니면 + <constant>E_WARNING</constant>이 발생합니다. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example xml:id="function.array-change-key-case.example-1"> + <title><function>array_change_key_case</function> 예제</title> + <programlisting role="php"> <![CDATA[ <?php $input_array = array("FirSt" => 1, "SecOnd" => 4); print_r(array_change_key_case($input_array, CASE_UPPER)); ?> ]]> - </programlisting> - <para> - 위 프로그램의 출력은 다음과 같다: - </para> - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ Array ( @@ -42,14 +85,21 @@ [SECOND] => 4 ) ]]> - </screen> - </example> - <para> - 배열이 이 함수가 실행된후 같은 인덱스를 갖는다면(예 "keY"와 "kEY"), - 배열에서 나중에 오는 값이 다른 인덱스를 덮어쓰게 된다. - </para> - </refsect1> - </refentry> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + 이 함수가 작동하는 배열에 동일한 인덱스가 존재하면(예. "keY"와 "kEY"), + 나중의 값이 다른 인덱스를 덮어씌웁니다. + </para> + </note> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/array/functions/array-chunk.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc-kr/reference/array/functions/array-chunk.xml diff -u phpdoc-kr/reference/array/functions/array-chunk.xml:1.4 phpdoc-kr/reference/array/functions/array-chunk.xml:1.5 --- phpdoc-kr/reference/array/functions/array-chunk.xml:1.4 Sun Nov 9 18:31:46 2008 +++ phpdoc-kr/reference/array/functions/array-chunk.xml Mon Dec 8 02:11:17 2008 @@ -1,45 +1,94 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.8 Maintainer: fuzzy74 Status: unknown --> - <refentry xml:id="function.array-chunk" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>array_chunk</refname> - <refpurpose>배열을 여러 덩어리로 분산시킨다</refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>array</type><methodname>array_chunk</methodname> - <methodparam><type>array</type><parameter>input</parameter></methodparam> - <methodparam><type>int</type><parameter>size</parameter></methodparam> - <methodparam choice="opt"><type>bool</type><parameter>preserve_keys</parameter></methodparam> - </methodsynopsis> - <para> - <function>array_chunk</function> 는 - <parameter>size</parameter> 값으로 여러개의 배열안에 배열을 분산시킨다. - 마지막 배열에서는 그 값보다 적은수의 값들을 갖는 배열을 갖을 수 있다. - 0부터 시작되는 인덱스를 갖는 다차원 배열의 구성원으로서의 배열을 얻는다. - </para> - <para> - 선택적인 <parameter>preserve_keys</parameter> 인수를 &true;로 - 설정함으로써, PHP가 입력 배열로부터의 원래 키를 유지할수 있게 한다. - &false;를 설정하면, 새로운 숫자 키가 사용될것이고 각 결과 배열들은 - 0부터 시작된다. 기본값은 &false;이다. - </para> - <example> - <title><function>array_chunk</function> 예제코드</title> - <programlisting role="php"> +<!-- EN-Revision: 1.13 Maintainer: progcom Status: ready --> +<refentry xml:id="function.array-chunk" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>array_chunk</refname> + <refpurpose>배열을 조각으로 나누기</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>array</type><methodname>array_chunk</methodname> + <methodparam><type>array</type><parameter>input</parameter></methodparam> + <methodparam><type>int</type><parameter>size</parameter></methodparam> + <methodparam choice="opt"><type>bool</type><parameter>preserve_keys</parameter></methodparam> + </methodsynopsis> + <para> + 배열을 <parameter>size</parameter> 크기 조각으로 나눕니다. 마지막 조각은 + <parameter>size</parameter> 원소보다 적은 조각을 가질 수 있습니다. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + + <varlistentry> + <term><parameter>input</parameter></term> + <listitem> + <para> + 작동할 배열 + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>size</parameter></term> + <listitem> + <para> + 각 조각의 크기 + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>preserve_keys</parameter></term> + <listitem> + <para> + &true;로 설정하면 키를 보존합니다. + 기본값은 &false;로 조각 숫자로 다시 인덱스합니다. + </para> + </listitem> + </varlistentry> + + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 0으로 시작하는 다차원 숫자 인덱스 배열을 반환합니다. 각 차원은 + <parameter>size</parameter> 원소를 가집니다. + </para> + </refsect1> + + <refsect1 role="errors"> + &reftitle.errors; + <para> + <parameter>size</parameter>가 1보다 작으면 <constant>E_WARNING</constant>이 + 발생하고 &null;을 반환합니다. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>array_chunk</function> 예제</title> + <programlisting role="php"> <![CDATA[ <?php $input_array = array('a', 'b', 'c', 'd', 'e'); print_r(array_chunk($input_array, 2)); -print_r(array_chunk($input_array, 2, TRUE)); +print_r(array_chunk($input_array, 2, true)); ?> ]]> - </programlisting> - <para> - 위 프로그램의 출력은 다음과 같을것이다: - </para> - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ Array ( @@ -82,10 +131,11 @@ ) ]]> - </screen> - </example> - </refsect1> - </refentry> + </screen> + </example> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/array/functions/array-diff-assoc.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc-kr/reference/array/functions/array-diff-assoc.xml diff -u phpdoc-kr/reference/array/functions/array-diff-assoc.xml:1.5 phpdoc-kr/reference/array/functions/array-diff-assoc.xml:1.6 --- phpdoc-kr/reference/array/functions/array-diff-assoc.xml:1.5 Sun Nov 9 18:31:46 2008 +++ phpdoc-kr/reference/array/functions/array-diff-assoc.xml Mon Dec 8 02:11:17 2008 @@ -1,74 +1,166 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.2 Maintainer: fuzzy74 Status: unknown --> - <refentry xml:id="function.array-diff-assoc" xmlns="http://docbook.org/ns/docbook"> - <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> +<!-- EN-Revision: 1.8 Maintainer: progcom Status: ready --> +<refentry xml:id="function.array-diff-assoc" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>array_diff_assoc</refname> + <refpurpose>추가적인 인덱스 확인과 함께 배열 차이를 계산</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <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> + <parameter>array1</parameter>를 <parameter>array2</parameter>에 비교하고 + 차이를 반환합니다. <function>array_diff</function>와 달리 배열 키를 비교에 + 사용합니다. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + + <varlistentry> + <term><parameter>array1</parameter></term> + <listitem> + <para> + 비교할 원본 배열 + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>array2</parameter></term> + <listitem> + <para> + 비교할 대상 배열 + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>...</parameter></term> + <listitem> + <para> + 추가 대상 배열 + </para> + </listitem> + </varlistentry> + + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 다른 배열에 존재하지 않는 <parameter>array1</parameter>의 모든 값을 가지는 + <type>array</type>를 반환합니다. + </para> + </refsect1> + +<!-- + <refsect1 role="errors"> + &reftitle.errors; + &errors.no.unusual.errors; + </refsect1> +--> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>array_diff_assoc</function> 예제</title> <para> - <function>array_diff_assoc</function>는 <parameter>array1</parameter> 중에서 - 다른 인수에서 존재하지 않는 모든 값들을 포함하는 배열을 반환한다. - 이 함수는 <function>array_diff</function>과 달리 비교시에 - 키가 사용된다는것에 주의한다. + 이 예제에서 <literal>"a" =&gt; "green"</literal> 쌍이 두 배열에 모두 + 존재하므로 함수에서 출력하지 않습니다. 이와 달리, <literal>0 =>&gt; + "red"</literal> 쌍은 출력하는데, 두번째 인수의 + <literal>"red"</literal>는 키가 <literal>1</literal>이기 때문입니다. </para> - <para> - <example> - <title><function>array_diff_assoc</function> 예제코드</title> - <programlisting role="php"> + <programlisting role="php"> <![CDATA[ <?php -$array1 = array ("a" => "green", "b" => "brown", "c" => "blue", "red"); -$array2 = array ("a" => "green", "yellow", "red"); -$result = array_diff_assoc ($array1, $array2); - -/* The result is: +$array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); +$array2 = array("a" => "green", "yellow", "red"); +$result = array_diff_assoc($array1, $array2); +print_r($result); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ Array ( [b] => brown [c] => blue [0] => red ) -*/ -?> ]]> - </programlisting> - </example> - </para> - <simpara> - 위 예제코드에서 <literal>"a" =&gt; "green"</literal> 쌍은 두 배열에 모두 - 존재하기 때문에 이 함수의 출력에서 존재하지 않는다. 이와 달리, - <literal>0 =&gt; "red"</literal> 쌍은 출력에 보이는데 그 이유는 - 두번째 인수에서 <literal>"red"</literal> 가 <literal>1</literal> 이라는 - 키를 갖기 때문이다. - </simpara> - <simpara> - <emphasis>key =&gt; value</emphasis> 쌍에서 두 구성요소가 동치라고 볼수 - 있는 때는 <literal>(string) $elem1 === (string) $elem2</literal> 일때 만이다. - 달리 말하면 엄격한 타입 검사는 문자열 대표성이 동일해야 한다는것이다. - <!-- TODO: example of it... --> - </simpara> - <note> - <simpara> - 이 함수는 n-차원 배열의 한개 차원만 검사한다는것에 주의한다. - 물론 <literal>array_diff_assoc($array1[0], $array2[0]);</literal>와 같은 - 방법으로 내부 차원을 검사할수 있다. - </simpara> - </note> + </screen> + </example> + </para> + <para> + <example> + <title><function>array_diff_assoc</function> 예제</title> <para> - <function>array_diff</function>, - <function>array_intersect</function>, - <function>array_intersect_assoc</function> 참고. + <emphasis>key =&gt; value</emphasis> 쌍에서 두 값은 <literal>(string) + $elem1 === (string) $elem2 </literal>일 때만 동일하다고 간주합니다. 즉, + 엄격한 확인을 하므로 문자열 표현이 동일해야 합니다. </para> - </refsect1> - </refentry> + <programlisting role="php"> +<![CDATA[ +<?php +$array1 = array(0, 1, 2); +$array2 = array("00", "01", "2"); +$result = array_diff_assoc($array1, $array2); +print_r($result); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Array +( + [0] => 0 + [1] => 1 + ) +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <simpara> + 이 함수는 n차원 배열의 1차원만 확인합니다. 물론, 깊은 차원은 + <literal>array_diff_assoc($array1[0], $array2[0]);</literal>처럼 확인할 수 + 있습니다. + </simpara> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>array_diff</function></member> + <member><function>array_intersect</function></member> + <member><function>array_intersect_assoc</function></member> + </simplelist> + </para> + </refsect1> + +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/array/functions/array-diff.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc-kr/reference/array/functions/array-diff.xml diff -u phpdoc-kr/reference/array/functions/array-diff.xml:1.5 phpdoc-kr/reference/array/functions/array-diff.xml:1.6 --- phpdoc-kr/reference/array/functions/array-diff.xml:1.5 Sun Nov 9 18:31:46 2008 +++ phpdoc-kr/reference/array/functions/array-diff.xml Mon Dec 8 02:11:17 2008 @@ -1,70 +1,135 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.9 Maintainer: fuzzy74 Status: unknown --> - <refentry xml:id="function.array-diff" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>array_diff</refname> - <refpurpose>배열간의 차이를 계산한다</refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>array</type><methodname>array_diff</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</function>는 <parameter>array1</parameter> 중에서 - 다른 인수에서 존재하지 않는 모든 값들을 포함하는 배열을 반환한다. - 키는 보존된다는 것에 주의. - </para> - <para> - <example> - <title><function>array_diff</function> 예제코드</title> - <programlisting role="php"> +<!-- EN-Revision: 1.16 Maintainer: progcom Status: ready --> +<!-- CREDITS: fuzzy74 --> +<refentry xml:id="function.array-diff" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>array_diff</refname> + <refpurpose>배열 차이를 계산</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>array</type><methodname>array_diff</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> + <parameter>array1</parameter>을 <parameter>array2</parameter>에 비교하고 + 차이를 반환합니다. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>array1</parameter></term> + <listitem> + <para> + 비교할 원본 배열 + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>array2</parameter></term> + <listitem> + <para> + 비교할 대상 배열 + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>...</parameter></term> + <listitem> + <para> + 추가 대상 배열 + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 다른 배열에 존재하지 않는 <parameter>array1</parameter>의 모든 값을 가지는 + <type>array</type>를 반환합니다. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>array_diff</function> 예제</title> + <programlisting role="php"> <![CDATA[ <?php $array1 = array ("a" => "green", "red", "blue", "red"); $array2 = array ("b" => "green", "yellow", "red"); $result = array_diff ($array1, $array2); + +print_r($result); ?> ]]> - </programlisting> - </example> - </para> - <para> - 위 코드는 <varname>$result</varname> 가 <literal>array ("blue");</literal> 값을 - 갖게 한다. $array1 안에서 여러값들의 차이가 발생한다면 모두 같은 방식으로 - 처리된다. - </para> - <note> - <simpara> - 두 구성요소가 동치라고 볼수 있는 때는 - <literal>(string) $elem1 === (string) $elem2</literal> 일때 만이다. - In words: when the string representation is the same. - <!-- TODO: example of it... --> - </simpara> - </note> - <note> - <simpara> - 이 함수는 n-차원의 배열 중 한 차원만 검사한다는 것에 주의한다. - 물론 <literal>array_diff($array1[0], $array2[0]);</literal> 을 사용하여 - 더 깊은 차원들을 검사할수 있다. - </simpara> - </note> - <warning> - <simpara> - 이 함수는 PHP 4.0.4에서 제대로 동작하지 않았다! - <!-- TODO: when exactly was this broken?... --> - </simpara> - </warning> + </programlisting> <para> - <function>array_diff_assoc</function>, - <function>array_intersect</function>, - <function>array_intersect_assoc</function> 참고. + $array1 안에서 여러 값들의 차이가 발생한다면 모두 같은 방식으로 + 처리합니다. 출력은: </para> - </refsect1> - </refentry> + <screen> +<![CDATA[ +Array +( + [1] => blue +) +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + 두 구성요소가 동치라고 볼수 있는 때는 + <literal>(string) $elem1 === (string) $elem2</literal> 일때 만이다. + In words: when the string representation is the same. + <!-- TODO: example of it... --> + </para> + </note> + <note> + <para> + 이 함수는 n-차원의 배열 중 한 차원만 검사한다는 것에 주의한다. + 물론 <literal>array_diff($array1[0], $array2[0]);</literal> 을 사용하여 + 더 깊은 차원들을 검사할수 있다. + </para> + </note> + <warning> + <simpara> + 이 함수는 PHP 4.0.4에서 제대로 동작하지 않았다! + <!-- TODO: when exactly was this broken?... --> + </simpara> + </warning> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>array_diff_assoc</function></member> + <member><function>array_intersect</function></member> + <member><function>array_intersect_assoc</function></member> + </simplelist> + </para> + </refsect1> + +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/array/functions/array-fill.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc-kr/reference/array/functions/array-fill.xml diff -u phpdoc-kr/reference/array/functions/array-fill.xml:1.4 phpdoc-kr/reference/array/functions/array-fill.xml:1.5 --- phpdoc-kr/reference/array/functions/array-fill.xml:1.4 Sun Nov 9 18:31:46 2008 +++ phpdoc-kr/reference/array/functions/array-fill.xml Mon Dec 8 02:11:17 2008 @@ -1,40 +1,94 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.9 Maintainer: fuzzy74 Status: unknown --> - <refentry xml:id="function.array-fill" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>array_fill</refname> - <refpurpose>배열을 특정값으로 채운다</refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>array</type><methodname>array_fill</methodname> - <methodparam><type>int</type><parameter>start_index</parameter></methodparam> - <methodparam><type>int</type><parameter>num</parameter></methodparam> - <methodparam><type>mixed</type><parameter>value</parameter></methodparam> - </methodsynopsis> - <para> - <function>array_fill</function>은 배열은 <parameter>value</parameter> - 인수의 값, <parameter>start_index</parameter>로 시작되는 키의 - <parameter>num</parameter> 엔트리들로 채운다. - <parameter>num</parameter> 는 0보다 큰 수가 되어야 하고, 그렇지 않으면 PHP - 는 경고를 보여준다. - </para> - <para> - <example> - <title><function>array_fill</function> 예제코드</title> - <programlisting role="php"> +<!-- EN-Revision: 1.15 Maintainer: progcom Status: ready --> +<refentry xml:id="function.array-fill" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>array_fill</refname> + <refpurpose>값으로 배열 채우기</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>array</type><methodname>array_fill</methodname> + <methodparam><type>int</type><parameter>start_index</parameter></methodparam> + <methodparam><type>int</type><parameter>num</parameter></methodparam> + <methodparam><type>mixed</type><parameter>value</parameter></methodparam> + </methodsynopsis> + <para> + 배열에 <parameter>value</parameter> 인수 값으로 <parameter>num</parameter> + 엔트리를 채웁니다. 키는 <parameter>start_index</parameter> 인수에서 + 시작합니다. + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + + <varlistentry> + <term><parameter>start_index</parameter></term> + <listitem> + <para> + 반환하는 배열의 첫 인덱스 + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>num</parameter></term> + <listitem> + <para> + 삽입할 원소 수 + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>value</parameter></term> + <listitem> + <para> + 채우는 데 사용할 값 + </para> + </listitem> + </varlistentry> + + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 채운 배열을 반환합니다. + </para> + </refsect1> + + <refsect1 role="errors"> + &reftitle.errors; + <para> + <parameter>num</parameter>가 1보다 작으면 <constant>E_WARNING</constant>이 + 발생합니다. + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>array_fill</function> 예제</title> + <programlisting role="php"> <![CDATA[ <?php $a = array_fill(5, 6, 'banana'); +$b = array_fill(-2, 2, 'pear'); print_r($a); +print_r($b); ?> ]]> - </programlisting> - <para> - <varname>$a</varname> 는 현재 다음과 같다: - </para> - <screen> + </programlisting> + &example.outputs; + <screen> <![CDATA[ Array ( @@ -45,16 +99,37 @@ [9] => banana [10] => banana ) +Array +( + [-2] => pear + [0] => pear +) ]]> - </screen> - </example> - </para> - <para> - <function>str_repeat</function>, - <function>range</function> 참고. - </para> - </refsect1> - </refentry> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <para> + 음수 키에 관한 자세한 설명은 매뉴얼 <link + linkend="language.types.array">배열</link> 섹션을 참고하십시오. + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>array_fill_keys</function></member> + <member><function>str_repeat</function></member> + <member><function>range</function></member> + </simplelist> + </para> + </refsect1> + +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/pcre/pattern.modifiers.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc-kr/reference/pcre/pattern.modifiers.xml diff -u phpdoc-kr/reference/pcre/pattern.modifiers.xml:1.5 phpdoc-kr/reference/pcre/pattern.modifiers.xml:1.6 --- phpdoc-kr/reference/pcre/pattern.modifiers.xml:1.5 Sun Nov 30 08:40:29 2008 +++ phpdoc-kr/reference/pcre/pattern.modifiers.xml Mon Dec 8 02:11:17 2008 @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.15 Maintainer: progcom Status: ready --> +<!-- EN-Revision: 1.16 Maintainer: progcom Status: ready --> <article xml:id="reference.pcre.pattern.modifiers" xmlns="http://docbook.org/ns/docbook"> <title>패턴 변경자</title> - <titleabbrev>정규표현식 패턴에 존재하는 변경자의 설명</titleabbrev> + <titleabbrev>정규표현식 패턴에 존재하는 변경자</titleabbrev> <para> 아래 목록은 현재 존재하는 PCRE 변경자입니다. 괄호 안의 이름은 http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/pcre/pattern.syntax.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc-kr/reference/pcre/pattern.syntax.xml diff -u phpdoc-kr/reference/pcre/pattern.syntax.xml:1.7 phpdoc-kr/reference/pcre/pattern.syntax.xml:1.8 --- phpdoc-kr/reference/pcre/pattern.syntax.xml:1.7 Thu Dec 4 23:28:38 2008 +++ phpdoc-kr/reference/pcre/pattern.syntax.xml Mon Dec 8 02:11:18 2008 @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.22 Maintainer: progcom Status: wip --> +<!-- EN-Revision: 1.23 Maintainer: progcom Status: wip --> <chapter xml:id="reference.pcre.pattern.syntax" xmlns="http://docbook.org/ns/docbook"> <title>패턴 문법</title> - <titleabbrev>PCRE 정규표현식 문법 설명</titleabbrev> + <titleabbrev>PCRE 정규표현식 문법</titleabbrev> <section xml:id="regexp.reference"> <title>정규표현식 상세</title> @@ -829,38 +829,31 @@ 숫자를 부여합니다. </para> <para> - The fact that plain parentheses fulfill two functions is not - always helpful. There are often times when a grouping subpattern - is required without a capturing requirement. If an - opening parenthesis is followed by "?:", the subpattern does - not do any capturing, and is not counted when computing the - number of any subsequent capturing subpatterns. For example, - if the string "the white queen" is matched against the - pattern + 평범한 괄호로 두 함수를 채우는 것이 항상 도움이 되지 않는게 사실입니다. + 종종 잡아내는 일 없이 서브패턴으로 묶을 필요가 있습니다. 여는 괄호 뒤에 + "?:"을 붙이면, 그 서브패턴은 잡히지 않고, 잡아낸 서브패턴의 수로 + 세어지지 않습니다. 예를 들어, 문자열 "the white queen"이 패턴 <literal>the ((?:red|white) (king|queen))</literal> - the captured substrings are "white queen" and "queen", and - are numbered 1 and 2. The maximum number of captured substrings - is 99, and the maximum number of all subpatterns, - both capturing and non-capturing, is 200. + 에 매치하면, 잡아낸 서브문자열은 "white queen"과 "queen"이고, 1과 2를 + 부여받습니다. 잡아낼 수 있는 서브 문자열의 최대수는 99이고, 잡아내는 + 것과 잡아내지 않는 것을 포함한 모든 서브패턴의 최대수는 200입니다. </para> <para> - As a convenient shorthand, if any option settings are - required at the start of a non-capturing subpattern, the - option letters may appear between the "?" and the ":". Thus - the two patterns + 편리한 단축형으로, 잡아내지 않는 서브패턴을 시작할 때 "?"와 ":" 사이에 + 옵션 문자를 넣어서 어떠한 옵션이라도 설정할 수 있습니다. 그러므로 + 두 패턴 </para> <literallayout> (?i:saturday|sunday) (?:(?i)saturday|sunday) </literallayout> <para> - match exactly the same set of strings. Because alternative - branches are tried from left to right, and options are not - reset until the end of the subpattern is reached, an option - setting in one branch does affect subsequent branches, so - the above patterns match "SUNDAY" as well as "Saturday". + 는 완전히 동일한 문자열에 매치합니다. 왜냐하면 대체 분기는 왼쪽에서 + 오른쪽으로 시도하며, 옵션을 서브패턴이 종료될 때까지 재설정하지 + 않습니다. 하나의 분기에서 설정한 옵션은 계속되는 분기에 영향을 주므로, + 위 패턴은 "SUNDAY"와 "Saturday"에도 매치합니다. </para> <para> PHP 4.3.3부터 <literal>(?P&lt;name&gt;pattern)</literal>으로 서브패턴에 @@ -998,15 +991,13 @@ 위해서 사용될 수 있습니다. </para> <para> - When a parenthesized subpattern is quantified with a minimum - repeat count that is greater than 1 or with a limited maximum, - more store is required for the compiled pattern, in - proportion to the size of the minimum or maximum. + 괄호로 싼 서브패턴이 2 이상의 최소 반복이나 최대 제한을 가지면, 컴파일한 + 패턴은 최소/최대의 크기에 따라서 더 많은 공간이 필요합니다. </para> <para> 패턴이 .*이나 .{0,}로 시작하고 <link linkend="reference.pcre.pattern.modifiers">PCRE_DOTALL</link> - 옵션(Perl의 /s와 동일)이 설정되면, .이 줄바꿈에도 매치하게 되면, 패턴은 + 옵션(Perl의 /s와 동일)이 설정되어 .이 줄바꿈에도 매치하게 되면, 패턴은 무조건 고정됩니다. 주제 문자열에 무엇이 붙어도 모든 문자가 포함되고, 처음 이후에 다른 위치를 잡을 수 없게 되기 때문입니다. PCRE는 그러한 패턴을 \A가 앞에 있는 것으로 취급합니다. 주제 문자열에 줄바꿈이 @@ -1016,21 +1007,18 @@ 표시할 수 있습니다. </para> <para> - When a capturing subpattern is repeated, the value captured - is the substring that matched the final iteration. For example, after + 잡아내는 서브패턴이 반복되면, 잡아낸 서브문자열은 마지막 반복에 + 매치합니다. 예를 들어, <literal>(tweedle[dume]{3}\s*)+</literal> - has matched "tweedledum tweedledee" the value of the captured - substring is "tweedledee". However, if there are - nested capturing subpatterns, the corresponding captured - values may have been set in previous iterations. For example, - after + 가 "tweedledum tweedledee"에 매치한 뒤에, 잡아낸 서브문자열의 값은 + "tweedledee"입니다. 그러나, 중첩된 잡아내는 서브패턴이 있으면, 잡아낸 + 값이 이전의 반복에서 설정될 수 있습니다. 에를 들어, <literal>/(a|(b))+/</literal> - matches "aba" the value of the second captured substring is - "b". + 가 "aba"에 매치한 뒤에, 두번째 잡아낸 서브 문자열의 값은 "b"입니다. </para> </section> @@ -1038,27 +1026,24 @@ <section xml:id="regexp.reference.back-references"> <title>역참조</title> <para> - Outside a character class, a backslash followed by a digit - greater than 0 (and possibly further digits) is a back - reference to a capturing subpattern earlier (i.e. to its - left) in the pattern, provided there have been that many - previous capturing left parentheses. + 문자열 클래스 밖에서, 백슬래시 뒤에 0을 초과하는 수(몇자리라도 될 수 + 있습니다)가 따라오는 경우는 패턴에서 이전에 잡아낸(즉, 왼쪽의) + 서브패턴의 역참조입니다. 그 위치에서 잡아내는 왼쪽 괄호로 주어집니다. </para> <para> - However, if the decimal number following the backslash is - less than 10, it is always taken as a back reference, and - causes an error only if there are not that many capturing - left parentheses in the entire pattern. In other words, the - parentheses that are referenced need not be to the left of - the reference for numbers less than 10. See the section - entitled "Backslash" above for further details of the handling - of digits following a backslash. + 그러나 백슬래시 뒤에 붙는 수가 10보다 작으면, 항상 역참조로 취급하여 + 전체 패턴에 충분한 잡아내는 왼쪽 괄호가 없으면 오류가 발생합니다. 즉, 10 + 미만의 참조의 왼쪽에는 참조를 가리키는 괄호가 필요 없습니다. 위에서 + "백슬래시" 섹션을 참고하여 백슬래시에 따라오는 수를 다루는 상세를 + 알아보십시오. </para> <para> A back reference matches whatever actually matched the capturing subpattern in the current subject string, rather than anything matching the subpattern itself. So the pattern + <literal>(sens|respons)e and \1ibility</literal> + matches "sense and sensibility" and "response and responsibility", but not "sense and responsibility". If caseful matching is in force at the time of the back reference, then http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/strings/functions/get-html-translation-table.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc-kr/reference/strings/functions/get-html-translation-table.xml diff -u phpdoc-kr/reference/strings/functions/get-html-translation-table.xml:1.4 phpdoc-kr/reference/strings/functions/get-html-translation-table.xml:1.5 --- phpdoc-kr/reference/strings/functions/get-html-translation-table.xml:1.4 Sun Nov 16 18:49:20 2008 +++ phpdoc-kr/reference/strings/functions/get-html-translation-table.xml Mon Dec 8 02:11:18 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.12 Maintainer: progcom Status: ready --> +<!-- EN-Revision: 1.13 Maintainer: progcom Status: ready --> <!-- CREDITS: cycle98 --> <refentry xml:id="function.get-html-translation-table" xmlns="http://docbook.org/ns/docbook"> <refnamediv> @@ -81,13 +81,18 @@ $trans = get_html_translation_table(HTML_ENTITIES); $str = "Hallo & <Frau> & Krämer"; $encoded = strtr($str, $trans); + +echo $encoded; ?> ]]> </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Hallo &amp;amp; &amp;lt;Frau&amp;gt; &amp;amp; Kr&amp;auml;mer +]]> + </screen> </example> - <literal>$encoded</literal> 변수는 다음을 가지게 됩니다: - <literal>"Hallo &amp;amp; &amp;lt;Frau&amp;gt; &amp;amp; - Kr&amp;auml;mer".</literal> </para> </refsect1>
« previous php.doc.kr (#807) next »