| Newsgroups |
php.doc.kr |
| Message-ID |
<[email protected]> |
Hello PHP KR Documentation team,
There are contributions within the online editor queue for this language.
Please review, then commit or delete these patches.
Patches for review :
-----------------------
New file: kr/reference/misc/functions/constant.xml
By: TaeL Kim on 2015-02-09 02:41:48
===================================================================
--- kr/reference/misc/functions/constant.xml
+++ kr/reference/misc/functions/constant.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Revision: $ -->
+<!-- EN-Revision: 299326 Maintainer: TaeL Kim Status: ready -->
+<!-- Reviewed: no -->
+
+<refentry xml:id="function.constant" xmlns="http://docbook.org/ns/docbook">
+ <refnamediv>
+ <refname>constant</refname>
+ <refpurpose>상수 값을 반환합니다</refpurpose>
+ </refnamediv>
+
+ <refsect1 role="description">
+ &reftitle.description;
+ <methodsynopsis>
+ <type>mixed</type><methodname>constant</methodname>
+ <methodparam><type>string</type><parameter>name</parameter></methodparam>
+ </methodsynopsis>
+ <simpara>
+ <parameter>name</parameter> 이 가리키는 상수 값을 반환합니다.
+ </simpara>
+ <simpara>
+ <function>constant</function> 는 이름을 모르는 상수 값을 얻어와야 할 때 유용하게 사용할 수 있습니다.
+ 예를 들면, 변수에 저장되어 있거나, 함수로부터 반환되는 경우입니다.
+ </simpara>
+ <simpara>
+ 이 함수는 <link linkend="language.oop5.constants">class constants</link>를 사용하는 경우에도 동작합니다.
+ </simpara>
+ </refsect1>
+
+ <refsect1 role="parameters">
+ &reftitle.parameters;
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>name</parameter></term>
+ <listitem>
+ <para>
+ 상수 이름
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1 role="returnvalues">
+ &reftitle.returnvalues;
+ <para>
+ 상수의 값을 반환하거나, 상수가 정의되지 않았을 경우 &null; 을 반환합니다.
+ </para>
+ </refsect1>
+
+ <refsect1 role="errors">
+ &reftitle.errors;
+ <para>
+ 상수가 정의되어 있지 않은 경우, <constant>E_WARNING</constant> 레벨 에러를 발생합니다.
+ </para>
+ </refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>constant</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+define("MAXSIZE", 100);
+
+echo MAXSIZE;
+echo constant("MAXSIZE"); // same thing as the previous line
+
+
+interface bar {
+ const test = 'foobar!';
+}
+
+class foo {
+ const test = 'foobar!';
+}
+
+$const = 'test';
+
+var_dump(constant('bar::'. $const)); // string(7) "foobar!"
+var_dump(constant('foo::'. $const)); // string(7) "foobar!"
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>define</function></member>
+ <member><function>defined</function></member>
+ <member>The section on <link linkend="language.constants">Constants</link></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
+-->
=> Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=60312
=> Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=60312
------------------------------------------------------------------
--
https://edit.php.net/
This email is send automatically by the Php Docbook Online Editor.