svn: /phpdoc/kr/trunk/language/ constants.xml
| From: | LEE Yun-young | Date: | Thu, 21 Jun 2012 14:55:36 +0000 |
| Subject: | svn: /phpdoc/kr/trunk/language/ constants.xml | ||
| Groups: | php.doc.kr | ||
| Request: | Send a blank email to doc-kr+get-1011@lists.php.net to get a copy of this message | ||
progcom Thu, 21 Jun 2012 14:55:36 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=326283
Log:
build error fix
Changed paths:
U phpdoc/kr/trunk/language/constants.xml
Modified: phpdoc/kr/trunk/language/constants.xml
===================================================================
--- phpdoc/kr/trunk/language/constants.xml 2012-06-21 14:09:42 UTC (rev 326282)
+++ phpdoc/kr/trunk/language/constants.xml 2012-06-21 14:55:36 UTC (rev 326283)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- EN-Revision: 288721 Maintainer: progcom Status: ready -->
+<!-- EN-Revision: 323859 Maintainer: progcom Status: ready -->
<!-- CREDITS: fuzzy74 -->
<chapter xml:id="language.constants" xmlns="http://docbook.org/ns/docbook">
<title>상수</title>
@@ -161,6 +161,15 @@
</example>
</para>
+ <note>
+ <para>
+ <function>define</function>을 통하여 정의하는 상수와 달리,
+ <literal>const</literal> 키워드를 통하여 정의하는 상수는 컴파일
시에
+ 정의되기에 최상위 영역에서 선언해야 합니다. 함수, 루프,
+ <literal>if</literal> 구문 안에서는 선언할 수 없습니다.
+ </para>
+ </note>
+
<simpara>
참고: <link linkend="language.oop5.constants">클래스 상수</link>.
</simpara>
@@ -178,7 +187,7 @@
</simpara>
<para>
- 일곱 가지 마법 상수가 존재한다. 이 상수들은
+ 여덟 가지 마법 상수가 존재한다. 이 상수들은
어디에서 쓰느냐에 따라 용도가 변경된다. 예를 들면,
<constant>__LINE__</constant>상수의 값은 스크립트의 해당 줄과
관련이 있다. 이 특별한 상수들은 대소문자 구별이 없고 다음과 같다:
@@ -194,13 +203,13 @@
</row>
</thead>
<tbody>
- <row>
+ <row xml:id="constant.line">
<entry><constant>__LINE__</constant></entry>
<entry>
파일의 현재 줄 번호
</entry>
</row>
- <row>
+ <row xml:id="constant.file">
<entry><constant>__FILE__</constant></entry>
<entry>
파일의 전체경로와 파일명. 포함한 파일 안에서 사용하면, 포함된
@@ -209,7 +218,7 @@
경로를 가지고 있었습니다.
</entry>
</row>
- <row>
+ <row xml:id="constant.dir">
<entry><constant>__DIR__</constant></entry>
<entry>
파일의 디렉토리. 포함한 파일 안에서는, 포함된 파일의 디렉토리를
@@ -218,29 +227,41 @@
(PHP 5.3.0에서 추가)
</entry>
</row>
- <row>
+ <row xml:id="constant.function">
<entry><constant>__FUNCTION__</constant></entry>
<entry>
함수명. (PHP 4.3.0에서 추가) PHP 5부터 이 상수는 정의된 그대로의
함수명을 반환합니다. (대소문자 구분) PHP 4에서는 항상
소문자였습니다.
</entry>
</row>
- <row>
+ <row xml:id="constant.class">
<entry><constant>__CLASS__</constant></entry>
<entry>
클래스명. (PHP 4.3.0에서 추가) PHP 5부터 이 상수는 정의된 그대로의
클래스명을 반환합니다. (대소문자 구분) PHP 4에서는 항상
- 소문자였습니다.
+ 소문자였습니다. 클래스명은 선언한 이름공간을 포함합니다. (예.
+ <literal>Foo\Bar</literal>) PHP 5.4부터 __CLASS__는 특성에서도
+ 동작합니다. 특성 메소드 안에서 사용할 때, __CLASS__는 특성이
사용되는
+ 클래스명입니다.
</entry>
</row>
- <row>
+ <row xml:id="constant.trait">
+ <entry><constant>__TRAIT__</constant></entry>
+ <entry>
+ 특성명. (PHP 5.4.0에서 추가) PHP 5.4부터 이 상수는 선언된 특성명을
+ 반환합니다. (대소문자 구분) 특성명은 선언한 이름공간을
포함합니다.
+ (예. <literal>Foo\Bar</literal>)
+ </entry>
+ </row>
+
+ <row xml:id="constant.method">
<entry><constant>__METHOD__</constant></entry>
<entry>
클래스 메쏘드명 (PHP 5.0.0에서 추가) 메쏘드 명은 정의한 대로
반환됩니다. (대소문자 구분)
</entry>
</row>
- <row>
+ <row xml:id="constant.namespace">
<entry><constant>__NAMESPACE__</constant></entry>
<entry>
현재 이름공간 이름 (대소문자 구분). 이 상수는 컴파일 시에