cvs: phpdoc-kr /faq installation.xml /features remote-files.xml /language operators.xml /reference/array/functions uksort.xml
/reference/strings/functions rtrim.xml

From: Date: Sat, 29 Nov 2008 08:22:16 +0000
Subject: cvs: phpdoc-kr /faq installation.xml /features remote-files.xml /language operators.xml /reference/array/functions uksort.xml
/reference/strings/functions rtrim.xml
Groups: php.doc.kr 
Request: Send a blank email to doc-kr+get-794@lists.php.net to get a copy of this message
progcom Sat Nov 29 08:22:16 2008 UTC Modified files: /phpdoc-kr/faq installation.xml /phpdoc-kr/features remote-files.xml /phpdoc-kr/language operators.xml /phpdoc-kr/reference/array/functions uksort.xml /phpdoc-kr/reference/strings/functions rtrim.xml Log: sync

http://cvs.php.net/viewvc.cgi/phpdoc-kr/faq/installation.xml?r1=1.7&r2=1.8&diff_format=u Index: phpdoc-kr/faq/installation.xml diff -u phpdoc-kr/faq/installation.xml:1.7 phpdoc-kr/faq/installation.xml:1.8 --- phpdoc-kr/faq/installation.xml:1.7 Sun Nov 23 17:19:38 2008 +++ phpdoc-kr/faq/installation.xml Sat Nov 29 08:22:15 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.52 Maintainer: progcom Status: ready --> +<!-- EN-Revision: 1.53 Maintainer: progcom Status: ready --> <chapter xml:id="faq.installation" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>설치</title> <titleabbrev>설치</titleabbrev> @@ -144,7 +144,7 @@ </itemizedlist> </para> <para> - 스크립트가 정규 표현식 함수(<function>ereg</function> 계열)를 + 스크립트가 정규 표현식 함수(<function>preg_match</function> 계열)를 사용한다면, PHP와 아파치를 동일한 정규 표현식 패키지로 컴파일해야 합니다. PHP와 아파치 1.3.x에서는 자동으로 됩니다. </para> http://cvs.php.net/viewvc.cgi/phpdoc-kr/features/remote-files.xml?r1=1.12&r2=1.13&diff_format=u Index: phpdoc-kr/features/remote-files.xml diff -u phpdoc-kr/features/remote-files.xml:1.12 phpdoc-kr/features/remote-files.xml:1.13 --- phpdoc-kr/features/remote-files.xml:1.12 Sun Nov 23 17:19:38 2008 +++ phpdoc-kr/features/remote-files.xml Sat Nov 29 08:22:15 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- EN-Revision: 1.29 Maintainer: progcom Status: ready --> +<!-- EN-Revision: 1.30 Maintainer: progcom Status: ready --> <!-- CREDITS: regina, fuzzy74 --> <chapter xml:id="features.remote-files" xmlns="http://docbook.org/ns/docbook"> <title>원격 파일 사용하기</title> @@ -53,7 +53,7 @@ while (!feof ($file)) { $line = fgets ($file, 1024); /* This only works if the title and its tags are on one line */ - if (eregi ("<title>(.*)</title>", $line, $out)) { + if (preg_match ("@\<title\>(.*)\</title\>@i", $line, $out)) { $title = $out[1]; break; } http://cvs.php.net/viewvc.cgi/phpdoc-kr/language/operators.xml?r1=1.12&r2=1.13&diff_format=u Index: phpdoc-kr/language/operators.xml diff -u phpdoc-kr/language/operators.xml:1.12 phpdoc-kr/language/operators.xml:1.13 --- phpdoc-kr/language/operators.xml:1.12 Fri Nov 28 16:33:12 2008 +++ phpdoc-kr/language/operators.xml Sat Nov 29 08:22:15 2008 @@ -653,10 +653,10 @@ <programlisting role="php"> <![CDATA[ <?php -// Example usage for: Ternary Operator +// 사용 예제: 삼항 연산자 $action = (empty($_POST['action'])) ? 'default' : $_POST['action']; -// The above is identical to this if/else statement +// 위 예제는 다음의 if/else 구문과 동일합니다 if (empty($_POST['action'])) { $action = 'default'; } else { @@ -767,14 +767,13 @@ </sect1> <sect1 xml:id="language.operators.execution"> - <title>Execution Operators</title> + <title>실행 연산자</title> <para> - PHP supports one execution operator: backticks (``). Note that - these are not single-quotes! PHP will attempt to execute the - contents of the backticks as a shell command; the output will be - returned (i.e., it won't simply be dumped to output; it can be - assigned to a variable). Use of the backtick operator is identical - to <function>shell_exec</function>. + PHP는 하나의 실행 연산자를 지원합니다: 역따옴표(``). 홑따옴표가 아닌 점에 + 주의하십시오! PHP는 역따옴표 안의 내용을 쉘 명령으로 실행하려 할 것입니다; + 출력을 반환합니다. (즉, 단순히 출력하는 것이 아닙니다; 변수에 할당할 수 + 있습니다) 역따옴표 연산자를 사용하는 것은 + <function>shell_exec</function>와 동일합니다. <informalexample> <programlisting role="php"> <![CDATA[ @@ -788,68 +787,65 @@ </para> <note> <para> - The backtick operator is disabled when &safemode; is enabled - or <function>shell_exec</function> is disabled. + 역따옴표 연산자는 &safemode;가 켜져있거나 + <function>shell_exec</function>가 비활성화 되면 사용할 수 없습니다. </para> </note> <para> - See also the manual section on <link linkend="ref.exec">Program - Execution functions</link>, <function>popen</function> - <function>proc_open</function>, and - <link linkend="features.commandline">Using PHP from the - commandline</link>. + 매뉴얼 <link linkend="ref.exec">프로그램 실행 함수</link> 섹션, + <function>popen</function>, <function>proc_open</function>, <link + linkend="features.commandline">PHP를 명령줄에서 사용하기</link>를 + 참고하십시오. </para> </sect1> <sect1 xml:id="language.operators.increment"> - <title>Incrementing/Decrementing Operators</title> + <title>증가/감소 연산자</title> <para> - PHP supports C-style pre- and post-increment and decrement - operators. + PHP는 C 형식의 사전, 사후 증가 및 감소 연산자를 지원합니다. </para> <note> <simpara> - The increment/decrement operators do not affect boolean values. - Decrementing &null; values has no effect too, but incrementing them - results in <literal>1</literal>. + 증가/감소 연산자는 논리 값에 영향을 주지 않습니다. &null; 값을 감소하는 + 것도 영향이 없지만, 증가시키면 <literal>1</literal>이 됩니다. </simpara> </note> <table> - <title>Increment/decrement Operators</title> + <title>증가/감소 연산자</title> <tgroup cols="3"> <thead> <row> - <entry>Example</entry> - <entry>Name</entry> - <entry>Effect</entry> + <entry>예제</entry> + <entry>이름</entry> + <entry>효과</entry> </row> </thead> <tbody> <row> <entry>++$a</entry> <entry>Pre-increment</entry> - <entry>Increments $a by one, then returns $a.</entry> + <entry>$a를 1 증가하고, $a를 반환.</entry> </row> <row> <entry>$a++</entry> <entry>Post-increment</entry> - <entry>Returns $a, then increments $a by one.</entry> + <entry>$a를 반환하고, $a를 1 증가.</entry> </row> <row> <entry>--$a</entry> <entry>Pre-decrement</entry> - <entry>Decrements $a by one, then returns $a.</entry> + <entry>$a를 1 감소하고, $a를 반환.</entry> </row> <row> <entry>$a--</entry> <entry>Post-decrement</entry> - <entry>Returns $a, then decrements $a by one.</entry> + <entry>$a를 반환하고, $a를 1 감소.</entry> </row> </tbody> </tgroup> </table> <para> - Here's a simple example script: + 간단한 예제 스크립트입니다: <informalexample> <programlisting role="php"> <![CDATA[ @@ -879,13 +875,12 @@ </informalexample> </para> <para> - PHP follows Perl's convention when dealing with arithmetic operations - on character variables and not C's. For example, in Perl 'Z'+1 turns - into 'AA', while in C 'Z'+1 turns into '[' ( ord('Z') == 90, ord('[') == 91 ). - Note that character variables can be incremented but not decremented and - even so only plain ASCII characters (a-z and A-Z) are supported. + PHP는 문자 변수에 계산 연산을 할 경우, C가 아닌 펄의 규정을 따릅니다. 예를 + 들면, 펄에서 'Z'+1은 'AA'가 되지만, C에서 'Z'+1은 '['( ord('Z') == 90, + ord('[') == 91)입니다. 문자 변수는 증가만 할 수 있고, 감소는 할 수 없으며, + ASCII 알파벳 문자(a-z와 A-Z)만 지원합니다. <example> - <title>Arithmetic Operations on Character Variables</title> + <title>문자 변수에 계산 연산</title> <programlisting role="php"> <![CDATA[ <?php @@ -910,65 +905,64 @@ </example> </para> <para> - Incrementing or decrementing booleans has no effect. + 논리값에 대한 증가나 감소는 영향이 없습니다. </para> </sect1> <sect1 xml:id="language.operators.logical"> - <title>Logical Operators</title> + <title>논리 연산자</title> <table> - <title>Logical Operators</title> + <title>논리 연산자</title> <tgroup cols="3"> <thead> <row> - <entry>Example</entry> - <entry>Name</entry> - <entry>Result</entry> + <entry>예제</entry> + <entry>이름</entry> + <entry>결과</entry> </row> </thead> <tbody> <row> <entry>$a and $b</entry> <entry>And</entry> - <entry>&true; if both $a and $b are &true;.</entry> + <entry>$a와 $b가 모두 &true;이면 &true;.</entry> </row> <row> <entry>$a or $b</entry> <entry>Or</entry> - <entry>&true; if either $a or $b is &true;.</entry> + <entry>$a나 $b가 &true;이면 &true;.</entry> </row> <row> <entry>$a xor $b</entry> <entry>Xor</entry> - <entry>&true; if either $a or $b is &true;, but not both.</entry> + <entry>$a와 $b중 하나만 &true;일 때만 &true;.</entry> </row> <row> <entry>! $a</entry> <entry>Not</entry> - <entry>&true; if $a is not &true;.</entry> + <entry>$a가 &true;가 아니면 &true;.</entry> </row> <row> <entry>$a &amp;&amp; $b</entry> <entry>And</entry> - <entry>&true; if both $a and $b are &true;.</entry> + <entry>$a와 $b가 모두 &true;이면 &true;.</entry> </row> <row> <entry>$a || $b</entry> <entry>Or</entry> - <entry>&true; if either $a or $b is &true;.</entry> + <entry>$a나 $b가 &true;이면 &true;.</entry> </row> </tbody> </tgroup> </table> <simpara> - The reason for the two different variations of "and" and "or" - operators is that they operate at different precedences. (See - <link linkend="language.operators.precedence">Operator - Precedence</link>.) + "and"와 "or" 연산자가 두 종류가 있는 것은, 다른 우선권을 가지기 + 때문입니다. (<link linkend="language.operators.precedence">연산자 + 우선권</link> 참고) </simpara> <example> - <title>Logical operators illustrated</title> + <title>논리 연산자 설명</title> <programlisting role="php"> <![CDATA[ <?php @@ -1008,9 +1002,9 @@ <simpara> There are two <type>string</type> operators. The first is the concatenation operator ('.'), which returns the concatenation of its - 오른쪽 and 왼쪽 arguments. The second is the concatenating assignment + right and left arguments. The second is the concatenating assignment operator ('.='), which appends the argument on the 오른쪽 side to - the argument on the 왼쪽 side. Please read <link + the argument on the left side. Please read <link linkend="language.operators.assignment">Assignment Operators</link> for more information. </simpara> http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/array/functions/uksort.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc-kr/reference/array/functions/uksort.xml diff -u phpdoc-kr/reference/array/functions/uksort.xml:1.6 phpdoc-kr/reference/array/functions/uksort.xml:1.7 --- phpdoc-kr/reference/array/functions/uksort.xml:1.6 Sat Nov 22 01:44:09 2008 +++ phpdoc-kr/reference/array/functions/uksort.xml Sat Nov 29 08:22:15 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.22 Maintainer: progcom Status: ready --> +<!-- EN-Revision: 1.23 Maintainer: progcom Status: ready --> <!-- CREDITS: fuzzy74 --> <refentry xml:id="function.uksort" xmlns="http://docbook.org/ns/docbook"> <refnamediv> @@ -64,8 +64,8 @@ <?php function cmp($a, $b) { - $a = ereg_replace('^(a|an|the) ', '', $a); - $b = ereg_replace('^(a|an|the) ', '', $b); + $a = preg_replace('@^(a|an|the) @', '', $a); + $b = preg_replace('@^(a|an|the) @', '', $b); return strcasecmp($a, $b); } http://cvs.php.net/viewvc.cgi/phpdoc-kr/reference/strings/functions/rtrim.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc-kr/reference/strings/functions/rtrim.xml diff -u phpdoc-kr/reference/strings/functions/rtrim.xml:1.4 phpdoc-kr/reference/strings/functions/rtrim.xml:1.5 --- phpdoc-kr/reference/strings/functions/rtrim.xml:1.4 Sun Nov 9 18:31:48 2008 +++ phpdoc-kr/reference/strings/functions/rtrim.xml Sat Nov 29 08:22:15 2008 @@ -1,100 +1,187 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- EN-Revision: 1.3 Maintainer: progcom Status: ready --> +<!-- EN-Revision: 1.11 Maintainer: progcom Status: ready --> <!-- CREDITS: cycle98 --> - <refentry xml:id="function.rtrim" xmlns="http://docbook.org/ns/docbook"> - <refnamediv> - <refname>rtrim</refname> - <refpurpose> - 문자열 끝 부분의 공백을 제거합니다. - </refpurpose> - </refnamediv> - <refsect1> - <title>설명</title> - <methodsynopsis> - <type>string</type><methodname>rtrim</methodname> - <methodparam><type>string</type><parameter>str</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>charlist</parameter></methodparam> - </methodsynopsis> - <note> +<refentry xml:id="function.rtrim" xmlns="http://docbook.org/ns/docbook"> + <refnamediv> + <refname>rtrim</refname> + <refpurpose>문자열 마지막의 공백(이나 다른 문자)을 제거</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>string</type><methodname>rtrim</methodname> + <methodparam><type>string</type><parameter>str</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>charlist</parameter></methodparam> + </methodsynopsis> + <para> + <parameter>str</parameter>의 끝 부분에서 공백을 제거한 문자열을 + 반환합니다. + </para> + <para> + 두번째 인수가 없으면, <function>rtrim</function>은 다음 + 문자들을 제거합니다: + <!-- sorted by importance. Printed 3 times: trim, ltrim, rtrim --> + <itemizedlist> + <listitem> + <simpara> + " " (<acronym>ASCII</acronym> <literal>32</literal> + (<literal>0x20</literal>)), 보통의 공백. + </simpara> + </listitem> + <listitem> + <simpara> + "\t" (<acronym>ASCII</acronym> <literal>9</literal> + (<literal>0x09</literal>)), 탭. + </simpara> + </listitem> + <listitem> + <simpara> + "\n" (<acronym>ASCII</acronym> <literal>10</literal> + (<literal>0x0A</literal>)), 줄바꿈. + </simpara> + </listitem> + <listitem> <simpara> - 두번째 인수는 PHP 4.1.0에서 추가되었습니다. + "\r" (<acronym>ASCII</acronym> <literal>13</literal> + (<literal>0x0D</literal>)), 캐리지 리턴. </simpara> - </note> - <para> - <parameter>str</parameter>의 끝 부분에서 공백을 제거한 문자열을 - 반환합니다. 두번째 인수가 없으면, <function>rtrim</function>은 다음 - 문자들을 제거합니다: - <!-- sorted by importance. Printed 3 times: trim, ltrim, rtrim --> - <itemizedlist> - <listitem> - <simpara> - " " (<acronym>ASCII</acronym> <literal>32</literal> - (<literal>0x20</literal>)), 보통의 공백. - </simpara> - </listitem> - <listitem> - <simpara> - "\t" (<acronym>ASCII</acronym> <literal>9</literal> - (<literal>0x09</literal>)), 탭. - </simpara> - </listitem> - <listitem> - <simpara> - "\n" (<acronym>ASCII</acronym> <literal>10</literal> - (<literal>0x0A</literal>)), 뉴라인. (줄바꿈) - </simpara> - </listitem> - <listitem> - <simpara> - "\r" (<acronym>ASCII</acronym> <literal>13</literal> - (<literal>0x0D</literal>)), 캐리지 리턴. - </simpara> - </listitem> - <listitem> - <simpara> - "\0" (<acronym>ASCII</acronym> <literal>0</literal> - (<literal>0x00</literal>)), <literal>NUL</literal> 바이트. - </simpara> - </listitem> - <listitem> - <simpara> <!-- not \v, since not supported by PHP --> - "\x0B" (<acronym>ASCII</acronym> <literal>11</literal> - (<literal>0x0B</literal>)), 수직 탭. - </simpara> - </listitem> - </itemizedlist> - </para> - <para> - <parameter>charlist</parameter> 인수를 통해서 제거하기를 원하는 문자를 - 지정할 수 있습니다. 간단히 제거하기를 원하는 모든 문자를 기록하면 됩니다. - <literal>..</literal>로 문자의 범위를 지정할 수 있습니다. - </para> - <example> - <title><function>rtrim</function> 사용 예제</title> - <para> - <programlisting role="php"> + </listitem> + <listitem> + <simpara> + "\0" (<acronym>ASCII</acronym> <literal>0</literal> + (<literal>0x00</literal>)), <literal>NUL</literal> 바이트. + </simpara> + </listitem> + <listitem> + <simpara> <!-- not \v, since not supported by PHP --> + "\x0B" (<acronym>ASCII</acronym> <literal>11</literal> + (<literal>0x0B</literal>)), 수직 탭. + </simpara> + </listitem> + </itemizedlist> + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>str</parameter></term> + <listitem> + <para> + 입력 문자열. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>charlist</parameter></term> + <listitem> + <para> + <parameter>charlist</parameter> 인수를 통해서 제거하기를 원하는 문자를 + 지정할 수 있습니다. 간단히 제거하기를 원하는 모든 문자를 기록하면 됩니다. + <literal>..</literal>로 문자의 범위를 지정할 수 있습니다. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 변경된 문자열을 반환합니다. + </para> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.1.0</entry> + <entry> + <parameter>charlist</parameter> 인수 추가. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>rtrim</function> 사용 예제</title> + <programlisting role="php"> <![CDATA[ <?php $text = "\t\tThese are a few words :) ... "; +$binary = "\x09Example string\x0A"; +$hello = "Hello World" +var_dump($text, $binary, $hello); + +print "\n"; + $trimmed = rtrim($text); -// $trimmed = "\t\tThese are a few words :) ..." +var_dump($trimmed); + $trimmed = rtrim($text, " \t."); -// $trimmed = "\t\tThese are a few words :)" -$clean = rtrim($binary, "\0x00..\0x1F"); +var_dump($trimmed); + +$trimmed = rtrim($hello, "Hdle"); +var_dump($trimmed); + // $binary의 마지막 부분에서 아스키 제어 문자를 제거합니다. -// (0에서 31까지) +// (0부터 31까지) +$clean = rtrim($binary, "\0x00..\0x1F"); +var_dump($clean); ?> ]]> - </programlisting> - </para> - </example> - <para> - 참고: <function>trim</function>, <function>ltrim</function>. - </para> - </refsect1> - </refentry> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +string(32) " These are a few words :) ... " +string(16) " Example string +" +string(11) "Hello World" + +string(30) " These are a few words :) ..." +string(26) " These are a few words :)" +string(9) "Hello Wor" +string(15) " Example string" +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>trim</function></member> + <member><function>ltrim</function></member> + </simplelist> + </para> + </refsect1> + +</refentry> <!-- Keep this comment at the end of the file Local variables:
« previous php.doc.kr (#794) next »