cvs: phpdoc-ja /reference/errorfunc ini.xml /reference/errorfunc/functions debug-backtrace.xml error-log.xml error-reporting.xml
restore-error-handler.xml set-error-handler.xml set-exception-handler.xml trigger-error.xml user-error.xml
| From: | TAKAGI Masahiro | Date: | Sat, 13 Aug 2005 23:57:47 +0000 |
| Subject: | cvs: phpdoc-ja /reference/errorfunc ini.xml /reference/errorfunc/functions debug-backtrace.xml error-log.xml error-reporting.xml restore-error-handler.xml set-error-handler.xml set-exception-handler.xml trigger-error.xml user-error.xml |
||
| Groups: | php.doc.ja | ||
| Request: | Send a blank email to doc-ja+get-1122@lists.php.net to get a copy of this message | ||
takagi Sat Aug 13 19:57:47 2005 EDT
Modified files:
/phpdoc-ja/reference/errorfunc/functions user-error.xml
trigger-error.xml
set-exception-handler.xml
set-error-handler.xml
restore-error-handler.xml
error-reporting.xml
error-log.xml
debug-backtrace.xml
/phpdoc-ja/reference/errorfunc ini.xml
Log:
sync with en.
http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/user-error.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/errorfunc/functions/user-error.xml diff -u phpdoc-ja/reference/errorfunc/functions/user-error.xml:1.4 phpdoc-ja/reference/errorfunc/functions/user-error.xml:1.5 --- phpdoc-ja/reference/errorfunc/functions/user-error.xml:1.4 Sun Jan 2 02:23:31 2005 +++ phpdoc-ja/reference/errorfunc/functions/user-error.xml Sat Aug 13 19:57:46 2005 @@ -1,33 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./ja/functions/errorfunc.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.1 Maintainer: hirokawa Status: ready --> - <refentry id="function.user-error"> - <refnamediv> - <refname>user_error</refname> - <refpurpose> - ã¦ã¼ã¶ã¬ãã«ã®ã¨ã©ã¼/è¦å/éç¥ã¡ãã»ã¼ã¸ãçºçãã - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <methodsynopsis> - <type>void</type><methodname>user_error</methodname> - <methodparam><type>string</type><parameter>error_msg</parameter></methodparam> - <methodparam><type>int</type><parameter> - <replaceable><optional>error_type</optional></replaceable> - </parameter></methodparam> - </methodsynopsis> - <para> - ããã¯ã<function>trigger_error</function>ã¸ã®ã¨ã¤ãªã¢ã¹ã§ãã - </para> - <para> - <function>error_reporting</function>, - <function>set_error_handler</function>, - <function>restore_error_handler</function>, - <function>trigger_error</function>ãåç §ãã ããã - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.6 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> +<refentry id="function.user-error"> + <refnamediv> + <refname>user_error</refname> + <refpurpose><function>trigger_error</function> ã®ã¨ã¤ãªã¢ã¹</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <para> + &info.function.alias; + <function>trigger_error</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/trigger-error.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/errorfunc/functions/trigger-error.xml diff -u phpdoc-ja/reference/errorfunc/functions/trigger-error.xml:1.4 phpdoc-ja/reference/errorfunc/functions/trigger-error.xml:1.5 --- phpdoc-ja/reference/errorfunc/functions/trigger-error.xml:1.4 Sun Jan 2 02:23:31 2005 +++ phpdoc-ja/reference/errorfunc/functions/trigger-error.xml Sat Aug 13 19:57:46 2005 @@ -1,55 +1,100 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./ja/functions/errorfunc.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.1 Maintainer: hirokawa Status: ready --> - <refentry id="function.trigger-error"> - <refnamediv> - <refname>trigger_error</refname> - <refpurpose> - ã¦ã¼ã¶ã¬ãã«ã®ã¨ã©ã¼/è¦å/éç¥ã¡ãã»ã¼ã¸ãçæãã - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <methodsynopsis> - <type>void</type><methodname>trigger_error</methodname> - <methodparam><type>string</type><parameter>error_msg</parameter></methodparam> - <methodparam><type>int</type><parameter> - <replaceable><optional>error_type</optional></replaceable> - </parameter></methodparam> - </methodsynopsis> +<!-- EN-Revision: 1.12 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> +<refentry id="function.trigger-error"> + <refnamediv> + <refname>trigger_error</refname> + <refpurpose>ã¦ã¼ã¶ã¬ãã«ã®ã¨ã©ã¼/è¦å/éç¥ã¡ãã»ã¼ã¸ãçæãã</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>trigger_error</methodname> + <methodparam><type>string</type><parameter>error_msg</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>error_type</parameter></methodparam> + </methodsynopsis> + <para> + ã¦ã¼ã¶ã¨ã©ã¼ãçºçããããã«ä½¿ç¨ãããçµè¾¼ã®ã¨ã©ã¼ãã³ãã©ã¾ã㯠+ æ°ããã¨ã©ã¼ãã³ãã©(<function>set_error_handler</function>) + ã¨ãã¦è¨å®æ¸ã®ã¦ã¼ã¶å®ç¾©é¢æ°ã¨çµã¿åããã¦ä½¿ç¨ããã¾ãã + </para> + <para> + ãã®é¢æ°ã¯ãå®è¡æã®ä¾å¤ã«ç¹å®ã®å¿çãçæããå¿ è¦ãããå ´åã« + 便å©ã§ãã + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>error_msg</parameter></term> + <listitem> + <para> + ãã®ã¨ã©ã¼ã«å²ãå½ã¦ãããã¡ãã»ã¼ã¸ãé·ãã¯æå¤§ 1024 æåã¾ã§ã§ãã + 1024 æåãè¶ ããé¨åã¯åãæ¨ã¦ããã¾ãã + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>error_type</parameter></term> + <listitem> + <para> + ãã®ã¨ã©ã¼ã«å²ãå½ã¦ãããã¨ã©ã¼åãE_USER é¢é£ã®å®æ°ã®ã¿ãæå®å¯è½ã§ã + ããã©ã«ã㯠<constant>E_USER_NOTICE</constant> ã§ãã + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + ãã®é¢æ°ã¯ãééã£ã <parameter>error_type</parameter> ãæå®ãããå ´åã« + &false; ãããã以å¤ã®å ´åã« &true; ãè¿ãã¾ãã + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>trigger_error</function> ã®ä¾</title> <para> - ã¦ã¼ã¶ã¨ã©ã¼ãçºçããããã«ä½¿ç¨ãããçµè¾¼ã®ã¨ã©ã¼ãã³ãã©ã¾ã㯠- æ°ããã¨ã©ã¼ãã³ãã©(<function>set_error_handler</function>)ã¨ã - ã¦è¨å®æ¸ã®ã¦ã¼ã¶å®ç¾©é¢æ°ã¨çµã¿åããã¦ä½¿ç¨ããã¾ããã¨ã©ã¼åã«ã¯ - E_USER é¢é£ã®å®æ°ã®ã¿ã使ç¨å¯è½ã§ãããã©ã«ã㯠- <constant>E_USER_NOTICE</constant>ã¨ãªã£ã¦ãã¾ãã + ããæ¡å¼µããä¾ã«ã¤ãã¦ã¯ <function>set_error_handler</function> + ãåç §ãã ããã </para> - <para> - ãã®é¢æ°ã¯ãå®è¡æã®ä¾å¤ã«ç¹å®ã®å¿çãçæããå¿ è¦ãããå ´åã«æ - ç¨ã§ãã以ä¸ã«ä¾ã示ãã¾ãã - <informalexample> - <programlisting> + <programlisting role="php"> <![CDATA[ -if (assert ($divisor == 0)) - trigger_error ("Cannot divide by zero", E_USER_ERROR); +<?php +if (assert($divisor == 0)) { + trigger_error("Cannot divide by zero", E_USER_ERROR); +} +?> ]]> - </programlisting> - </informalexample> - <note> - <para> - ããã詳細ãªä¾ã«ã¤ãã¦ã¯ã - <function>set_error_handler</function> ãåç §ãã ããã - </para> - </note> - </para> - <para> - <function>error_reporting</function>, - <function>set_error_handler</function>, - <function>restore_error_handler</function>, - <function>user_error</function>ãåç §ãã ããã - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>error_reporting</function></member> + <member><function>set_error_handler</function></member> + <member><function>restore_error_handler</function></member> + <member>The <link linkend="errorfunc.constants">ã¨ã©ã¼ã¬ãã«å®æ°</link></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/set-exception-handler.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-ja/reference/errorfunc/functions/set-exception-handler.xml diff -u phpdoc-ja/reference/errorfunc/functions/set-exception-handler.xml:1.1 phpdoc-ja/reference/errorfunc/functions/set-exception-handler.xml:1.2 --- phpdoc-ja/reference/errorfunc/functions/set-exception-handler.xml:1.1 Thu Dec 30 08:04:09 2004 +++ phpdoc-ja/reference/errorfunc/functions/set-exception-handler.xml Sat Aug 13 19:57:46 2005 @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.4 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.7 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> <refentry id="function.set-exception-handler"> <refnamediv> <refname>set_exception_handler</refname> @@ -15,31 +16,17 @@ <methodparam><type>callback</type><parameter>exception_handler</parameter></methodparam> </methodsynopsis> <para> - ä¾å¤ãtry/catchãããã¯ã®ä¸ã§ãã£ãããããªãã£ãå ´åã® + ä¾å¤ã try/catch ãããã¯ã®ä¸ã§ãã£ãããããªãã£ãå ´åã® ããã©ã«ãã®ä¾å¤ãã³ãã©ãè¨å®ãã¾ãã ä¾å¤ã¯ã<parameter>exception_handler</parameter> ãã³ã¼ã«ãããå¾ã« 忢ãã¾ãã </para> <para> <parameter>exception_handler</parameter> ã¯ã - <function>set_exception_handler</function>ãã³ã¼ã«ããåã« - å®ç¾©ããå¿ è¦ãããã¾ãããã®é¢æ°ã¯ããã©ã¡ã¼ã¿ãä¸ã¤ + <function>set_exception_handler</function> ãã³ã¼ã«ããåã« + å®ç¾©ããå¿ è¦ãããã¾ãããã®ãã³ãã©é¢æ°ã¯ããã©ã¡ã¼ã¿ãã²ã¨ã¤ ã¨ãå¿ è¦ãããã¾ãã ãã®ãã©ã¡ã¼ã¿ã¯ãã¹ãã¼ãããä¾å¤ãªãã¸ã§ã¯ãã¨ãªãã¾ãã - <methodsynopsis> - <methodname><replaceable>exception_handler</replaceable></methodname> - <methodparam><type>object</type><parameter>exception</parameter></methodparam> - </methodsynopsis> - <variablelist> - <varlistentry> - <term><parameter>exception</parameter></term> - <listitem> - <para> - ãã£ãããããªãä¾å¤ãçºçããéã«ã³ã¼ã«ããã颿°ã®åå - </para> - </listitem> - </varlistentry> - </variablelist> </para> </refsect1> <refsect1> @@ -60,7 +47,7 @@ <refsect1> &reftitle.returnvalues; <para> - åã«å®ç¾©ãããä¾å¤ãã³ãã©ã¾ãã¯ã¨ã©ã¼çºçæã«&false;ãè¿ãã¾ãã + åã«å®ç¾©ãããä¾å¤ãã³ãã©ã®ååãã¾ãã¯ã¨ã©ã¼çºçæã« &false; ãè¿ãã¾ãã åã«ãã³ãã©ãå®ç¾©ããã¦ããªãå ´åãç©ºã®æååãè¿ããã¾ãã </para> </refsect1> @@ -89,10 +76,11 @@ <refsect1> &reftitle.seealso; <para> - <function>restore_exception_handler</function> - <function>restore_error_handler</function> - <function>error_reporting</function>&listendand; - <link linkend="language.oop5.exceptions">PHP 5ä¾å¤</link> + <function>restore_exception_handler</function>, + <function>restore_error_handler</function>, + <function>error_reporting</function>, + &seealso.callback;, &listendand; + <link linkend="language.exceptions">PHP 5 ä¾å¤</link>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/set-error-handler.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-ja/reference/errorfunc/functions/set-error-handler.xml diff -u phpdoc-ja/reference/errorfunc/functions/set-error-handler.xml:1.6 phpdoc-ja/reference/errorfunc/functions/set-error-handler.xml:1.7 --- phpdoc-ja/reference/errorfunc/functions/set-error-handler.xml:1.6 Sun Jan 2 02:23:31 2005 +++ phpdoc-ja/reference/errorfunc/functions/set-error-handler.xml Sat Aug 13 19:57:46 2005 @@ -1,14 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.6 $ --> -<!-- EN-Revision: 1.24 Maintainer: hirokawa Status: ready --> - <refentry id="function.set-error-handler"> +<!-- $Revision: 1.7 $ --> +<!-- EN-Revision: 1.30 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> +<refentry id="function.set-error-handler"> <refnamediv> <refname>set_error_handler</refname> <refpurpose> ã¦ã¼ã¶å®ç¾©ã®ã¨ã©ã¼ãã³ãã©é¢æ°ãè¨å®ãã </refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>mixed</type><methodname>set_error_handler</methodname> @@ -18,198 +20,278 @@ <para> ã¹ã¯ãªããã®ã¨ã©ã¼å¦çãè¡ãã¦ã¼ã¶é¢æ° (<parameter>error_handler</parameter>)ãè¨å®ãã¾ãã - åã«å®ç¾©ãããã¨ã©ã¼ãã³ãã©(ããå ´å)ãå«ãæååã¾ã㯠- ã¨ã©ã¼ã®å ´åã« &false; ãè¿ãã¾ãã - åã«å®ç¾©ããããã³ãã©ãã¯ã©ã¹ã¡ã½ããã®å ´åããã®é¢æ°ã¯ã - ã¯ã©ã¹ã¨ã¡ã½ããåãããªãæ·»åé åãè¿ãã¾ãã </para> <para> ãã®é¢æ°ã¯ãå®è¡æã®ã¨ã©ã¼å¦çãã¦ã¼ã¶ãå®ç¾©ããããã«ä½¿ç¨ãã¾ãã - ä¾ãã°ãè´å½çãªã¨ã©ã¼ãçºçããå ´åããããæ¡ä»¶ã®ãã¨ã« - (<function>trigger_error</function>ã使ç¨ãã¦)ã¨ã©ã¼ãçºçããå¿ - è¦ãããå ´åã«ãã¼ã¿ããã¡ã¤ã«ãæ¶å»ããå¿ è¦ããããããªã¢ããªã±ã¼ - ã·ã§ã³ããã®å ´åã«ãããã¾ãã - </para> - <para> - äºçªç®ã®ãã©ã¡ã¼ã¿<parameter>error_types</parameter>ã¯ãPHP 5ã§å°å ¥ããã - è¨å®ãã©ã¡ã¼ã¿ - <link linkend="ini.error-reporting">error_reporting</link>㨠- å ¨ãåæ§ã«ã表示ããã¨ã©ã¼ãå¶å¾¡ããããã« - <parameter>error_handler</parameter>èµ·åããã¹ã¯ããéã« - 使ç¨å¯è½ã§ãã - ãã®ãã¹ã¯ãæå®ããªãå ´åã - <parameter>error_handler</parameter>㯠- <link - linkend="ini.error-reporting">error_reporting</link>ã®è¨å®ã«ããã - å ¨ã¦ã®ã¨ã©ã¼ã«é¢ãã¦ã³ã¼ã«ããã¾ãã - </para> - <para> - ã¦ã¼ã¶é¢æ°ã¯ãäºã¤ã®å¼æ°ãã¨ã©ã¼ã³ã¼ãã¨ã¨ã©ã¼ãè¨è¿°ããæååãåãåã - å¿ è¦ãããã¾ããPHP 4.0.2 ãããªãã·ã§ã³ã®ãã©ã¡ã¼ã¿ã¨ãã¦3ã¤ã®å¼æ°ã - 追å ããã¦ãã¾ãããããã¯ãã¨ã©ã¼ãçºçãããã¡ã¤ã«åãã¨ã©ã¼ãçºçããè¡ã - çºçããã¨ã©ã¼ã®ã³ã³ããã¹ã(ã¨ã©ã¼ãçºçããå ´æã§ã®ã¢ã¯ãã£ããªã·ã³ãã«ãã¼ã - ã«ãæãé å)ã§ãã - 颿°ã¯ã以ä¸ã®ããã«è¡¨ããã¾ãã - <methodsynopsis> - <methodname><replaceable>handler</replaceable></methodname> - <methodparam><type>int</type><parameter>errno</parameter></methodparam> - <methodparam><type>string</type><parameter>errstr</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>errfile</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>errline</parameter></methodparam> - <methodparam choice="opt"><type>array</type><parameter>errcontext</parameter></methodparam> - </methodsynopsis> + ä¾ãã°ãè´å½çãªã¨ã©ã¼ã®éã«ãã¼ã¿ããã¡ã¤ã«ãæ¶å»ããå¿ è¦ããããã㪠+ ã¢ããªã±ã¼ã·ã§ã³ããããæ¡ä»¶ã®ãã¨ã« + (<function>trigger_error</function>ã使ç¨ãã¦)ã¨ã©ã¼ãçºçããå¿ è¦ããã + ã¢ããªã±ã¼ã·ã§ã³ããã®å ´åã«ãããã¾ãã + </para> + <para> + PHP ã®æ¨æºã®ã¨ã©ã¼ãã³ãã©ã¯å®å ¨ã«ãã¤ãã¹ããããã¨ã«æ³¨æãã¦ãã ããã + <function>error_reporting</function> ã®è¨å®ã«ããããããã©ã®ãããªå ´åã§ã + ã¦ã¼ã¶ãè¨å®ããã¨ã©ã¼ãã³ãã©ãã³ã¼ã«ããã¾ãããã ãããã®å ´åã§ã + ãã³ãã©ã§ <function>error_reporting</function> ã®ã«ã¬ã³ãã®å¤ãèªã¿ã + ããã«ãããã¦é©åã«åä½ããããã¨ã¯å¯è½ã§ããã¨ã©ã¼ãçºçããå½ä»¤ã®åã« + <link linkend="language.operators.errorcontrol">@ ã¨ã©ã¼å¶å¾¡æ¼ç®å + </link> ãä»å ããã¦ããå ´åããã®å¤ã¯ 0 ã¨ãªããã¨ã«ã¯æ³¨æãã¾ãããã + </para> + <para> + ã¦ã¼ã¶ãã³ãã©é¢æ°ã¯ãå¿ è¦ã«å¿ã㦠<function>die</function> ã + ã³ã¼ã«ãã責任ããããã¨ã«ã注æãã¾ããããã¨ã©ã¼ãã³ãã©é¢æ°ã + ãªã¿ã¼ã³ããå ´åãã¹ã¯ãªããã®å®è¡ã¯ãã¨ã©ã¼ãçºçããå½ä»¤ã®æ¬¡ã®å½ä»¤ã« + ç¶ç¶ããã¾ãã + </para> + <para> + 以ä¸ã®ã¨ã©ã¼ã¿ã¤ãã¯ãã¦ã¼ã¶å®ç¾©ã®é¢æ°ã§ã¯æ±ãã¾ããã + <constant>E_ERROR</constant>, <constant>E_PARSE</constant>, + <constant>E_CORE_ERROR</constant>, <constant>E_CORE_WARNING</constant>, + <constant>E_COMPILE_ERROR</constant>, + <constant>E_COMPILE_WARNING</constant> ããã³ + <function>set_error_handler</function> ãã³ã¼ã«ããããã¡ã¤ã«ã§çºçãã + 大åã® <constant>E_STRICT</constant> ã + </para> + <para> + (ãã¡ã¤ã«ã¢ãããã¼ãã®ããã«)ã¹ã¯ãªãããå®è¡ãããåã«ã¨ã©ã¼ã + çºçããå ´åãã«ã¹ã¿ã ã¨ã©ã¼ãã³ãã©ã¯ã³ã¼ã«ããã¾ããã + ããã¯ããã®æç¹ã§ã¯ç»é²ããã¦ããªãããã§ãã + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> <variablelist> <varlistentry> - <term><parameter>errno</parameter></term> - <listitem> - <simpara> - The first parameter, <replaceable>errno</replaceable>, contains the - level of the error raised, as an integer. - </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>errstr</parameter></term> - <listitem> - <simpara> - The second parameter, <parameter>errstr</parameter>, contains the - error message, as a string. - </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>errfile</parameter></term> - <listitem> - <simpara> - The third parameter is optional, <parameter>errfile</parameter>, - which contains the filename that the error was raised in, as a string. - </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>errline</parameter></term> + <term><parameter>error_handler</parameter></term> <listitem> - <simpara> - The fourth parameter is optional, <parameter>errline</parameter>, - which contains the line number the error was raised at, as an integer. - </simpara> + <para> + ã¦ã¼ã¶é¢æ°ã¯ãã¨ã©ã¼ã³ã¼ãã¨ã¨ã©ã¼ãè¨è¿°ããæååã® 2 ã¤ã®å¼æ°ã + åãåãå¿ è¦ãããã¾ããããã«ãªãã·ã§ã³ã®ãã©ã¡ã¼ã¿ã¨ã㦠3 ã¤ã®å¼æ°ã + 追å ããã¦ãã¾ãããããã¯ãã¨ã©ã¼ãçºçãããã¡ã¤ã«åãã¨ã©ã¼ã + çºçããè¡ãçºçããã¨ã©ã¼ã®ã³ã³ããã¹ã(ã¨ã©ã¼ãçºçããå ´æã§ã® + ã¢ã¯ãã£ããªã·ã³ãã«ãã¼ãã«ãæãé å)ã§ãã颿°ã¯ä»¥ä¸ã®ããã«ãªãã¾ãã + </para> + <para> + <methodsynopsis> + <methodname><replaceable>handler</replaceable></methodname> + <methodparam><type>int</type><parameter>errno</parameter></methodparam> + <methodparam><type>string</type><parameter>errstr</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>errfile</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>errline</parameter></methodparam> + <methodparam choice="opt"><type>array</type><parameter>errcontext</parameter></methodparam> + </methodsynopsis> + <variablelist> + <varlistentry> + <term><parameter>errno</parameter></term> + <listitem> + <simpara> + æåã®ãã©ã¡ã¼ã¿ <parameter>errno</parameter> ã¯ãçºçããã + ã¨ã©ã¼ã®ã¬ãã«ãæ´æ°ã§æ ¼ç´ãã¾ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>errstr</parameter></term> + <listitem> + <simpara> + 2 çªç®ã®ãã©ã¡ã¼ã¿ <parameter>errstr</parameter> ã¯ã + ã¨ã©ã¼ã¡ãã»ã¼ã¸ãæååã§æ ¼ç´ãã¾ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>errfile</parameter></term> + <listitem> + <simpara> + 3 çªç®ã®ãã©ã¡ã¼ã¿ <parameter>errfile</parameter> ã¯ãªãã·ã§ã³ã§ã + ã¨ã©ã¼ãçºçãããã¡ã¤ã«ã®ååãæååã§æ ¼ç´ãã¾ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>errline</parameter></term> + <listitem> + <simpara> + 4 çªç®ã®ãã©ã¡ã¼ã¿ <parameter>errline</parameter> ã¯ãªãã·ã§ã³ã§ã + ã¨ã©ã¼ãçºçããè¡çªå·ãæ´æ°ã§æ ¼ç´ãã¾ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>errcontext</parameter></term> + <listitem> + <simpara> + 5 çªç®ã®ãã©ã¡ã¼ã¿ <parameter>errcontext</parameter> ã¯ãªãã·ã§ã³ã§ã + ã¨ã©ã¼ãçºçããå ´æã®ã¢ã¯ãã£ãã·ã³ãã«ãã¼ãã«ãæãé åã§ãã + ã¤ã¾ããã¨ã©ã¼ãçºçããã¹ã³ã¼ãå ã§ã®ãã¹ã¦ã®å¤æ°ã®å å®¹ãæ ¼ç´ãã + é åã <parameter>errcontext</parameter> ã ã¨ãããã¨ã§ãã + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>errcontext</parameter></term> + <term><parameter>error_types</parameter></term> <listitem> - <simpara> - The fifth parameter is optional, <parameter>errcontext</parameter>, - which is an array that points to the active symbol table at the point - the error occurred. In other words, <parameter>errcontext</parameter> - will contain an array of every variable that existed in the scope the - error was triggered in. - </simpara> + <para> + è¨å®ãã©ã¡ã¼ã¿ + <link linkend="ini.error-reporting">error_reporting</link> + ã§è¡¨ç¤ºããã¨ã©ã¼ãå¶å¾¡ããã®ã¨å ¨ãåæ§ã«ã + <parameter>error_handler</parameter> ã®èµ·åãå¶å¾¡ããéã« + 使ç¨å¯è½ã§ãã + ãã®ãã¹ã¯ãæå®ããªãå ´åã + <parameter>error_handler</parameter> 㯠+ <link + linkend="ini.error-reporting">error_reporting</link> ã®è¨å®ã«ããã + å ¨ã¦ã®ã¨ã©ã¼ã«é¢ãã¦ã³ã¼ã«ããã¾ãã + </para> </listitem> </varlistentry> - </variablelist> + </variablelist> </para> - <note> - <simpara> - 颿°åã®ä»£ããã«ãªãã¸ã§ã¯ãã¸ã®ãªãã¡ã¬ã³ã¹ã¨ã¡ã½ããåãå«ãé å - ãæå®ãããã¨ãã§ãã¾ãã(PHP 4.3.0以é) - </simpara> - </note> - <note> - <para> - 以ä¸ã®ã¨ã©ã¼åã¯ã¦ã¼ã¶å®ç¾©é¢æ°ã§ã¯æ±ããã¨ãã§ãã¾ããã - <constant>E_ERROR</constant>, <constant>E_PARSE</constant>, - <constant>E_CORE_ERROR</constant>, <constant>E_CORE_WARNING</constant>, - <constant>E_COMPILE_ERROR</constant>, - <constant>E_COMPILE_WARNING</constant> - </para> - </note> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + åã«å®ç¾©ãããã¨ã©ã¼ãã³ãã©(ããå ´å)ãå«ãæååãã¾ã㯠+ ã¨ã©ã¼ã®å ´åã«ã¯ &false; ãè¿ãã¾ãã + åã«å®ç¾©ããããã³ãã©ãã¯ã©ã¹ã¡ã½ããã®å ´åããã®é¢æ°ã¯ã + ã¯ã©ã¹ã¨ã¡ã½ããåãããªãæ·»åé åãè¿ãã¾ãã + </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>5.0.0</entry> + <entry> + <parameter>error_types</parameter> ãã©ã¡ã¼ã¿ã追å ããã¾ããã + </entry> + </row> + <row> + <entry>4.3.0</entry> + <entry> + <parameter>error_handler</parameter> ã¨ãã¦ã颿°åã®ãããã« + ãªãã¸ã§ã¯ãã¸ã®ãªãã¡ã¬ã³ã¹ã¨ã¡ã½ããåãå«ãé åãæå®ãããã¨ã + ã§ãã¾ãã + </entry> + </row> + <row> + <entry>4.0.2</entry> + <entry> + ã¦ã¼ã¶å®ç¾©é¢æ° <parameter>error_handler</parameter> ã§ 3 ã¤ã® + ãªãã·ã§ã³ãã©ã¡ã¼ã¿ãå©ç¨ã§ããããã«ãªãã¾ãããfilename, line number, + ããã³ context ã§ãã + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> - 以ä¸ã®ä¾ã§ã¯ãã¨ã©ã¼ãçºçãããã¨ã«ããå é¨ä¾å¤ã®å¦çã表示ãã - ã¦ã¼ã¶å®ç¾©é¢æ°ã«ãããããå¦çãã¾ãã <example> <title> - <function>set_error_handler</function>ããã³ - <function>trigger_error</function>ã«ããã¨ã©ã¼å¦ç + <function>set_error_handler</function> ããã³ + <function>trigger_error</function> ã«ããã¨ã©ã¼å¦ç </title> + <para> + 以ä¸ã®ä¾ã§ã¯ãã¨ã©ã¼ãçºçããããã¨ã«ããå é¨ä¾å¤ã®å¦çã + ããããã¦ã¼ã¶å®ç¾©é¢æ°ã§å¦çããæ¹æ³ã説æãã¾ãã + </para> <programlisting role="php"> <![CDATA[ <?php - -// ã¦ã¼ã¶ã¨ã©ã¼å®æ°ã«ããåå®ç¾© - PHP4 ã®ã¿ -define("FATAL",E_USER_ERROR); -define("ERROR",E_USER_WARNING); -define("WARNING",E_USER_NOTICE); - // ãã®ã¹ã¯ãªããã®ã¨ã©ã¼åºåã¬ãã«ãè¨å® -error_reporting (FATAL | ERROR | WARNING); +error_reporting(E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE); // ã¨ã©ã¼ãã³ãã©é¢æ° -function myErrorHandler ($errno, $errstr, $errfile, $errline) { +function myErrorHandler($errno, $errstr, $errfile, $errline) +{ switch ($errno) { - case FATAL: - echo "<b>FATAL</b> [$errno] $errstr<br>\n"; - echo " Fatal error in line ".$errline." of file ".$errfile; - echo ", PHP ".PHP_VERSION." (".PHP_OS.")<br>\n"; - echo "Aborting...<br>\n"; - exit -1; + case E_USER_ERROR: + echo "<b>My ERROR</b> [$errno] $errstr<br />\n"; + echo " Fatal error in line $errline of file $errfile"; + echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n"; + echo "Aborting...<br />\n"; + exit(1); break; - case ERROR: - echo "<b>ERROR</b> [$errno] $errstr<br>\n"; + case E_USER_WARNING: + echo "<b>My WARNING</b> [$errno] $errstr<br />\n"; break; - case WARNING: - echo "<b>WARNING</b> [$errno] $errstr<br>\n"; + case E_USER_NOTICE: + echo "<b>My NOTICE</b> [$errno] $errstr<br />\n"; break; - default: - echo "Unkown error type: [$errno] $errstr<br>\n"; + default: + echo "Unkown error type: [$errno] $errstr<br />\n"; break; } } // ã¨ã©ã¼å¦çã®ãã¹ãç¨é¢æ° -function scale_by_log ($vect, $scale) { - if ( !is_numeric($scale) || $scale <= 0 ) - trigger_error("log(x) for x <= 0 is undefined, you used: scale = $scale", - FATAL); +function scale_by_log($vect, $scale) +{ + if (!is_numeric($scale) || $scale <= 0) { + trigger_error("log(x) for x <= 0 is undefined, you used: scale = $scale", E_USER_ERROR); + } + if (!is_array($vect)) { - trigger_error("Incorrect input vector, array of values expected", ERROR); + trigger_error("Incorrect input vector, array of values expected", E_USER_WARNING); return null; } + for ($i=0; $i<count($vect); $i++) { if (!is_numeric($vect[$i])) - trigger_error("Value at position $i is not a number, using 0 (zero)", - WARNING); - $temp[$i] = log($scale) * $vect[$i]; + trigger_error("Value at position $i is not a number, using 0 (zero)", E_USER_NOTICE); + $temp[$i] = log($scale) * $vect[$i]; + } + return $temp; } - return $temp; -} // å®ç¾©ããã¨ã©ã¼ãã³ãã©ãè¨å®ãã $old_error_handler = set_error_handler("myErrorHandler"); // ã¨ã©ã¼ãçºçãã¾ããã¾ããæ°å¤ã§ãªãé ç®ãæ··ãã£ãé åãå®ç¾©ãã¾ãã echo "vector a\n"; -$a = array(2,3,"foo",5.5,43.3,21.11); +$a = array(2,3, "foo", 5.5, 43.3, 21.11); print_r($a); -// 次ã«è¦åãçºçãããããª2çªç®ã®é åãçæãã¾ãã +// 次ã«è¦åãçºçãããã㪠2 çªç®ã®é åãçæãã¾ãã echo "----\nvector b - a warning (b = log(PI) * a)\n"; $b = scale_by_log($a, M_PI); print_r($b); // é åã®ä»£ããã«æååãæ¸¡ãã¦ãããåé¡ãçºçãã¾ãã -echo "----\nvector c - an error\n"; -$c = scale_by_log("not array",2.3); +echo "----\nvector c - an error\n"; +$c = scale_by_log("not array", 2.3); var_dump($c); -// ã¼ãã¾ãã¯è² æ°ã® log ãå®ç¾©ãããªãã¨ããè´å½çãªã¨ã©ã¼ãçºçãã¾ãã +// ã¼ãã¾ãã¯è² æ°ã®å¯¾æ°ãå®ç¾©ãããªãã¨ããè´å½çãªã¨ã©ã¼ãçºçãã¾ãã echo "----\nvector d - fatal error\n"; $d = scale_by_log($a, -2.5); ?> ]]> </programlisting> - &example.outputs; + &example.outputs.similar; <screen> <![CDATA[ vector a @@ -241,48 +323,24 @@ ---- vector d - fatal error <b>FATAL</b> [256] log(x) for x <= 0 is undefined, you used: scale = -2.5<br /> - Fatal error in line 36 of file trigger_error.php, PHP 4.0.2 (Linux)<br /> +Fatal error in line 36 of file trigger_error.php, PHP 4.0.2 (Linux)<br /> Aborting...<br /> ]]> </screen> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - PHP ã®æ¨æºã®ã¨ã©ã¼ãã³ãã©ã¯å®å ¨ã«ãã¤ãã¹ããããã¨ã«æ³¨æãã¦ä¸ - ããã<function>error_reporting</function> ã®è¨å®ã¯å½±é¿ãããã©ã® - ãããªå ´åã§ãã¦ã¼ã¶ãè¨å®ããã¨ã©ã¼ãã³ãã©ãã³ã¼ã«ããã¾ããã - ã ãããã®å ´åã§ããã³ãã©ã§ <function>error_reporting</function> - ã®ã«ã¬ã³ãã®å¤ãèªã¿ãé©å½ã«åä½ããããã¨ã¯å¯è½ã§ããã¨ã©ã¼ãçº - çããå½ä»¤ã®åã« <link - linkend="language.operators.errorcontrol">@ ã¨ã©ã¼å¶å¾¡æ¼ç®å - </link> ãä»å ããã¦ããå ´åããã®å¤ã¯ 0 ã¨ãªããã¨ã«ã¯æ³¨æãè¦ã - ã¾ãã - </para> - <para> - ã¦ã¼ã¶ãã³ãã©é¢æ°ã¯ãè¦ããã° <function>die</function> ãã³ã¼ã« - ãã責任ããããã¨ã«ã注æãè¦ãã¾ããã¨ã©ã¼ãã³ãã©é¢æ°ããªã¿ã¼ - ã³ããå ´åãã¹ã¯ãªããã®å®è¡ã¯ãã¨ã©ã¼ãçºçããå½ä»¤ã®æ¬¡ã®å½ä»¤ã« - ç¶ç¶ããã¾ãã - </para> - <note> - <para> - (ãã¡ã¤ã«ã¢ãããã¼ãã®ããã«)ã¹ã¯ãªãããå®è¡ãããåã«ã¨ã©ã¼ãçº - çããå ´åãã«ã¹ã¿ã ã¨ã©ã¼ãã³ãã©ã¯ã³ã¼ã«ããã¾ããã - ããã¯ããã®æç¹ã§ã¯ç»é²ããã¦ããªãããã§ãã - </para> - </note> - <note> - <para> - äºçªç®ã®ãã©ã¡ã¼ã¿<parameter>error_types</parameter>㯠- PHP 5ã§è¿½å ããã¾ããã - </para> - </note> - <para> - <function>error_reporting</function>, - <function>restore_error_handler</function>, - <function>trigger_error</function>, ããã³ - <link linkend="errorfunc.constants">ã¨ã©ã¼ã¬ãã«å®æ°</link> - ãåç §ãã ããã + <simplelist> + <member><function>error_reporting</function></member> + <member><function>restore_error_handler</function></member> + <member><function>trigger_error</function></member> + <member><link linkend="errorfunc.constants">ã¨ã©ã¼ã¬ãã«å®æ°</link></member> + <member>&seealso.callback;</member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/restore-error-handler.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/errorfunc/functions/restore-error-handler.xml diff -u phpdoc-ja/reference/errorfunc/functions/restore-error-handler.xml:1.4 phpdoc-ja/reference/errorfunc/functions/restore-error-handler.xml:1.5 --- phpdoc-ja/reference/errorfunc/functions/restore-error-handler.xml:1.4 Sun Jan 2 02:23:31 2005 +++ phpdoc-ja/reference/errorfunc/functions/restore-error-handler.xml Sat Aug 13 19:57:46 2005 @@ -1,32 +1,91 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./ja/functions/errorfunc.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.1 Maintainer: hirokawa Status: ready --> - <refentry id="function.restore-error-handler"> - <refnamediv> - <refname>restore_error_handler</refname> - <refpurpose> - 以åã®ã¨ã©ã¼ãã³ãã©é¢æ°ãå復ãã - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <methodsynopsis> - <type>void</type><methodname>restore_error_handler</methodname> - <void/> - </methodsynopsis> - <para> - <function>set_error_handler</function>ã使ç¨ãã¦ã¨ã©ã¼ãã³ãã©é¢ - æ°ã夿´ããå¾ãå ã®ã¨ã©ã¼ãã³ãã©(çµè¾¼ã¾ãã¯ã¦ã¼ã¶å®ç¾©é¢æ°)ã«æ» - ãããã«ä½¿ç¨ããã¾ãã - </para> +<!-- EN-Revision: 1.12 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> +<refentry id="function.restore-error-handler"> + <refnamediv> + <refname>restore_error_handler</refname> + <refpurpose>以åã®ã¨ã©ã¼ãã³ãã©é¢æ°ãå復ãã</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>restore_error_handler</methodname> + <void/> + </methodsynopsis> + <para> + <function>set_error_handler</function> ã使ç¨ãã¦ã¨ã©ã¼ãã³ãã©é¢æ°ã + 夿´ããå¾ãå ã®ã¨ã©ã¼ãã³ãã©(çµè¾¼ã¾ãã¯ã¦ã¼ã¶å®ç¾©é¢æ°)ã«æ»ãããã« + 使ç¨ããã¾ãã + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + ãã®é¢æ°ã¯å¸¸ã« &true; ãè¿ãã¾ãã + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>restore_error_handler</function> ã®ä¾</title> <para> - <function>error_reporting</function>, - <function>set_error_handler</function>, - <function>trigger_error</function>, - <function>user_error</function>ãåç §ãã ããã + <function>unserialize</function> ãã¨ã©ã¼ãçºçããå ´åã« + å ã®ã¨ã©ã¼ãã³ãã©ã«æ»ããã¨ã«ãã </para> - </refsect1> - </refentry> + <programlisting role="php"> +<![CDATA[ +<?php +function unserialize_handler($errno, $errstr) +{ + echo "Invalid serialized value.\n"; +} + +$serialized = 'foo'; +set_error_handler('unserialize_handler'); +$original = unserialize($serialized); +restore_error_handler(); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Invalid serialized value. +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + <literal>error_handler</literal> 颿°ã®ä¸ãã + <function>restore_error_handler</function> ãã³ã¼ã«ãããå ´åã + ããã¯ç¡è¦ããã¾ãã + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>error_reporting</function></member> + <member><function>set_error_handler</function></member> + <member><function>restore_exception_handler</function></member> + <member><function>trigger_error</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/error-reporting.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/errorfunc/functions/error-reporting.xml diff -u phpdoc-ja/reference/errorfunc/functions/error-reporting.xml:1.4 phpdoc-ja/reference/errorfunc/functions/error-reporting.xml:1.5 --- phpdoc-ja/reference/errorfunc/functions/error-reporting.xml:1.4 Tue Nov 23 02:40:57 2004 +++ phpdoc-ja/reference/errorfunc/functions/error-reporting.xml Sat Aug 13 19:57:46 2005 @@ -1,36 +1,157 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.11 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.14 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> <refentry id="function.error-reporting"> <refnamediv> <refname>error_reporting</refname> - <refpurpose>åºåããPHPã¨ã©ã¼ã®ç¨®é¡ãè¨å®ãã</refpurpose> + <refpurpose>åºåãã PHP ã¨ã©ã¼ã®ç¨®é¡ãè¨å®ãã</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>int</type><methodname>error_reporting</methodname> <methodparam choice="opt"><type>int</type><parameter>level</parameter></methodparam> </methodsynopsis> <para> - <function>error_reporting</function>颿°ã¯ã + <function>error_reporting</function> 颿°ã¯ã <link linkend="ini.error-reporting">error_reporting</link> ãã£ã¬ã¯ãã£ãã - å®è¡æã«è¨å®ãã¾ããPHPã«ã¯å¤ãã®ã¨ã©ã¼ã¬ãã«ãããã + å®è¡æã«è¨å®ãã¾ããPHP ã«ã¯å¤ãã®ã¨ã©ã¼ã¬ãã«ãããã ãã®é¢æ°ã«ããã¹ã¯ãªããã®æç¶æé(å®è¡æé)ã®ã¬ãã«ãè¨å®ããã¾ãã </para> - <para> - <function>error_reporting</function>ã¯ãPHPã®ã¨ã©ã¼åºå - ã¬ãã«ãè¨å®ããå ã®ã¬ãã«ãè¿ãã¾ãã - <parameter>level</parameter> ãã©ã¡ã¼ã¿ã¯ãããããã¹ã¯ - ã¾ããã¯ååä»ãã®å®æ°ã®ã©ã¡ãããã¨ãã¾ãã - å°æ¥ã®ãã¼ã¸ã§ã³ã¨ã®äºææ§ãä¿è¨¼ããããã«ã - ååä»ãã®å®æ°ã®ä½¿ç¨ãå¼·ãæ¨å¥¨ããã¦ãã¾ãã - ã¨ã©ã¼ã¬ãã«ã追å ãããæãæ´æ°ã®ã¬ã³ã¸ã¯å¢å ãã¾ãã - ãã®ããã以åã®æ´æ°ã使ç¨ããã¨ã©ã¼ã¬ãã«ã¯å¸¸ã«æå¾ é - ãã«åä½ããã¨ã¯éãã¾ããã + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>level</parameter></term> + <listitem> + <para> + æ°ãã <link linkend="ini.error-reporting">error_reporting</link> + ã¬ãã«ãããããã¹ã¯ã¾ãã¯ååã¤ã宿°ã®ã©ã¡ããã§ããå°æ¥ã® + ãã¼ã¸ã§ã³ã¨ã®äºææ§ãä¿è¨¼ããããã«ãååã¤ã宿°ã®ä½¿ç¨ã + å¼·ãæ¨å¥¨ããã¦ãã¾ããã¨ã©ã¼ã¬ãã«ã追å ãããã¨ãæ´æ°ã®å¹ ã¯å¢å ãã¾ãã + ãã®ããã以åã®æ´æ°ã使ç¨ããã¨ã©ã¼ã¬ãã«ã¯å¸¸ã«æå¾ éãã«åä½ããã¨ã¯ + éãã¾ããã + </para> + <para> + å©ç¨å¯è½ãªã¨ã©ã¼ã¬ãã«å®æ°ã®ä¸è¦§ã以ä¸ã«ç¤ºãã¾ãã + ãããã®ã¨ã©ã¼ã®å®éã®æå³ã¯ã + <link linkend="errorfunc.constants">å®ç¾©æ¸ã¿ã®å®æ°</link>ã« + è¨è¿°ããã¦ãã¾ãã + <table> + <title><function>error_reporting</function> ã¬ãã«å®æ°ã¨ãããå¤</title> + <tgroup cols="2"> + <thead> + <row> + <entry>å¤</entry> + <entry>宿°</entry> + </row> + </thead> + <tbody> + <row> + <entry>1</entry> + <entry> + <link linkend="e-error">E_ERROR</link> + </entry> + </row> + <row> + <entry>2</entry> + <entry> + <link linkend="e-warning">E_WARNING</link> + </entry> + </row> + <row> + <entry>4</entry> + <entry> + <link linkend="e-parse">E_PARSE</link> + </entry> + </row> + <row> + <entry>8</entry> + <entry> + <link linkend="e-notice">E_NOTICE</link> + </entry> + </row> + <row> + <entry>16</entry> + <entry> + <link linkend="e-core-error">E_CORE_ERROR</link> + </entry> + </row> + <row> + <entry>32</entry> + <entry> + <link linkend="e-core-warning">E_CORE_WARNING</link> + </entry> + </row> + <row> + <entry>64</entry> + <entry> + <link linkend="e-compile-error">E_COMPILE_ERROR</link> + </entry> + </row> + <row> + <entry>128</entry> + <entry> + <link linkend="e-compile-warning">E_COMPILE_WARNING</link> + </entry> + </row> + <row> + <entry>256</entry> + <entry> + <link linkend="e-user-error">E_USER_ERROR</link> + </entry> + </row> + <row> + <entry>512</entry> + <entry> + <link linkend="e-user-warning">E_USER_WARNING</link> + </entry> + </row> + <row> + <entry>1024</entry> + <entry> + <link linkend="e-user-error">E_USER_NOTICE</link> + </entry> + </row> + <row> + <entry>2047</entry> + <entry> + <link linkend="e-all">E_ALL</link> + </entry> + </row> + <row> + <entry>2048</entry> + <entry> + <link linkend="e-strict">E_STRICT</link> + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - <example role="php"> + 夿´åã® <link linkend="ini.error-reporting">error_reporting</link> + ã¬ãã«ãè¿ãã¾ãã + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> <title><function>error_reporting</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ @@ -39,133 +160,53 @@ // å ¨ã¦ã®ã¨ã©ã¼åºåããªãã«ãã error_reporting(0); -// Report simple running errors +// åç´ãªå®è¡æã¨ã©ã¼ã表示ãã error_reporting(E_ERROR | E_WARNING | E_PARSE); -// Reporting E_NOTICE can be good too (to report uninitialized -// variables or catch variable name misspellings ...) +// E_NOTICE ã表示ãããã®ãããããï¼åæåããã¦ããªã +// 夿°ã夿°åã®ã¹ãã«ãã¹ãªã©â¦ï¼ error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); -// Report all errors except E_NOTICE -// This is the default value set in php.ini +// E_NOTICE 以å¤ã®å ¨ã¦ã®ã¨ã©ã¼ã表示ãã +// ãã㯠php.ini ã§è¨å®ããã¦ããããã©ã«ãå¤ error_reporting(E_ALL ^ E_NOTICE); -// Report all PHP errors (bitwise 63 may be used in PHP 3) +// å ¨ã¦ã® PHP ã¨ã©ã¼ã表示ããï¼ããã 63 㯠PHP 3 ã§å©ç¨ãããï¼ error_reporting(E_ALL); -// Same as error_reporting(E_ALL); +// error_reporting(E_ALL); ã¨åã ini_set('error_reporting', E_ALL); + +?> ]]> </programlisting> </example> </para> - <para> - å©ç¨å¯è½ãªã¨ã©ã¼ã¬ãã«å®æ°ã®ä¸è¦§ã以ä¸ã«ç¤ºãã¾ãã - ãããã®ã¨ã©ã¼ã®å®éã®æå³ã¯ã - <link linkend="errorfunc.constants">å®ç¾©æ¸ã¿ã®å®æ°</link>.ã« - è¨è¿°ããã¦ãã¾ãã - <table> - <title><function>error_reporting</function>ã¬ãã«å®æ°ã¨ãããå¤</title> - <tgroup cols="2"> - <thead> - <row> - <entry>å¤</entry> - <entry>宿°</entry> - </row> - </thead> - <tbody> - <row> - <entry>1</entry> - <entry> - <link linkend="e-error">E_ERROR</link> - </entry> - </row> - <row> - <entry>2</entry> - <entry> - <link linkend="e-warning">E_WARNING</link> - </entry> - </row> - <row> - <entry>4</entry> - <entry> - <link linkend="e-parse">E_PARSE</link> - </entry> - </row> - <row> - <entry>8</entry> - <entry> - <link linkend="e-notice">E_NOTICE</link> - </entry> - </row> - <row> - <entry>16</entry> - <entry> - <link linkend="e-core-error">E_CORE_ERROR</link> - </entry> - </row> - <row> - <entry>32</entry> - <entry> - <link linkend="e-core-warning">E_CORE_WARNING</link> - </entry> - </row> - <row> - <entry>64</entry> - <entry> - <link linkend="e-compile-error">E_COMPILE_ERROR</link> - </entry> - </row> - <row> - <entry>128</entry> - <entry> - <link linkend="e-compile-warning">E_COMPILE_WARNING</link> - </entry> - </row> - <row> - <entry>256</entry> - <entry> - <link linkend="e-user-error">E_USER_ERROR</link> - </entry> - </row> - <row> - <entry>512</entry> - <entry> - <link linkend="e-user-warning">E_USER_WARNING</link> - </entry> - </row> - <row> - <entry>1024</entry> - <entry> - <link linkend="e-user-error">E_USER_NOTICE</link> - </entry> - </row> - <row> - <entry>2047</entry> - <entry> - <link linkend="e-all">E_ALL</link> - </entry> - </row> - <row> - <entry>2048</entry> - <entry> - <link linkend="e-strict">E_STRICT</link> - </entry> - </row> - </tbody> - </tgroup> - </table> - </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <warning> <simpara> - PHP > 5.0.0以éãå¤2048ãæãã<constant>E_STRICT</constant>ãå©ç¨å¯è½ã§ãã - <constant>E_ALL</constant> ã«ã¯ãã¨ã©ã¼ã¬ãã« - <constant>E_STRICT</constant>ã¯å«ã¾ãã¾ããã + PHP > 5.0.0 ã§ã¯ãå¤ 2048 ãæãã <constant>E_STRICT</constant> + ãå©ç¨å¯è½ã§ãã<constant>E_ALL</constant> ã«ã¯ãã¨ã©ã¼ã¬ãã« + <constant>E_STRICT</constant> ã¯å«ã¾ã<emphasis>ã¾ãã</emphasis>ã + ã»ã¨ãã©ã® <constant>E_STRICT</constant> ã¬ãã«ã®ã¨ã©ã¼ã¯ã¹ã¯ãªããã® + ã³ã³ãã¤ã«æã«çºçãã¾ãããã®ããã + <link linkend="ini.error-reporting">error_reporting</link> ã§ + <constant>E_STRICT</constant> ãå«ãããã«è¨å®ããã¦ããç°å¢ã§ã¯ + ãããã®ã¨ã©ã¼ãæ¤åºã§ãã¾ããã </simpara> </warning> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - <link linkend="ini.display-errors">display_errors</link> - <function>ini_set</function>. + <simplelist> + <member><link linkend="ini.display-errors">display_errors</link> ãã£ã¬ã¯ãã£ã</member> + <member><function>ini_set</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/error-log.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-ja/reference/errorfunc/functions/error-log.xml diff -u phpdoc-ja/reference/errorfunc/functions/error-log.xml:1.3 phpdoc-ja/reference/errorfunc/functions/error-log.xml:1.4 --- phpdoc-ja/reference/errorfunc/functions/error-log.xml:1.3 Mon Nov 22 23:45:32 2004 +++ phpdoc-ja/reference/errorfunc/functions/error-log.xml Sat Aug 13 19:57:46 2005 @@ -1,111 +1,155 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./ja/functions/errorfunc.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.1 Maintainer: hirokawa Status: ready --> - <refentry id="function.error-log"> - <refnamediv> - <refname>error_log</refname> - <refpurpose>ã¨ã©ã¼ã¡ãã»ã¼ã¸ãéä¿¡ãã</refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <methodsynopsis> - <type>int</type><methodname>error_log</methodname> - <methodparam><type>string</type><parameter>message</parameter></methodparam> - <methodparam><type>int</type><parameter>message_type</parameter></methodparam> - <methodparam><type>string</type><parameter> - <replaceable><optional>destination</optional></replaceable> - </parameter></methodparam> - <methodparam><type>string</type><parameter> - <replaceable><optional>extra_headers</optional></replaceable> - </parameter></methodparam> - </methodsynopsis> - <para> - ã¨ã©ã¼ã¡ãã»ã¼ã¸ã Web ãµã¼ãã®ã¨ã©ã¼ãã°ã - <acronym>TCP</acronym>ãã¼ãããã¡ã¤ã«ã®ããããã«éãã¾ãã - æåã®ãã©ã¡ã¼ã¿ <parameter>message</parameter> ã¯ãã°ããã - ã¡ãã»ã¼ã¸ã§ãã2 çªç®ã®ãã©ã¡ã¼ã¿ <parameter>message_type - </parameter> ã¯ã¡ãã»ã¼ã¸ãã©ãã¸éãã®ããæå®ãã¾ãã - <table> - <title><function>error_log</function> ãã°ã¿ã¤ã</title> - <tgroup cols="2"> - <tbody> - <row> - <entry>0</entry> - <entry> - <parameter>message</parameter> ã¯ããªãã¬ã¼ãã£ã³ã°ã»ã·ã¹ãã - ã®ã·ã¹ãã ãã°ã®ã¡ã«ããºã ã¾ãã¯ãã¡ã¤ã«ã®ããããã使ã£ã¦ - PHP ã®ã·ã¹ãã ã»ãã¬ã¼ã«éããã¾ããã©ã¡ãã使ããããã¯ã - <link linkend="ini.error-log">error_log</link> ã®è¨å® - ãã£ã¬ã¯ãã£ãã«ããæ±ºå®ããã¾ãã - </entry> - </row> - <row> - <entry>1</entry> - <entry> - <parameter>message</parameter> ã¯ã<parameter>destination - </parameter> ãã©ã¡ã¼ã¿ã§æå®ãããã¢ãã¬ã¹ã«ãé»åã¡ã¼ã« - ã«ããéããã¾ãããã®ã¡ãã»ã¼ã¸ã¿ã¤ãã®å ´åã«ã®ã¿ã - 4 çªç®ã®ãã©ã¡ã¼ã¿ã§ãã <parameter>extra_headers</parameter> - ã使ããã¾ãããã®ã¡ãã»ã¼ã¸ã¿ã¤ãã¯ã<function>mail</function> - ã¨åæ§ã«ãåãååã®å é¨é¢æ°ã使ç¨ãã¾ãã - </entry> - </row> - <row> - <entry>2</entry> - <entry> - <parameter>message</parameter> ã¯ãPHP ã®ãããã°ç¨ã³ãã¯ã·ã§ã³ - ãéãã¦éããã¾ãããã®ãªãã·ã§ã³ã¯ã - <link linkend="install.configure.enable-debugger">ãªã¢ã¼ãã - ããã°ãæå¹ã«ãªã£ã¦ãã</link>å ´åã®ã¿ä½¿ç¨ã§ãã¾ãããã®ã±ã¼ - ã¹ã§ã¯ã<parameter>destination</parameter> ãã©ã¡ã¼ã¿ã«ããã - ãããã°æ å ±ãåãåãã½ã±ããã®ãã¹ãåã¾ã㯠IP ã¢ãã¬ã¹ã - ããã³ãªãã·ã§ã³ã§ãã¼ãçªå·ãæå®ãã¾ãã - </entry> - </row> - <row> - <entry>3</entry> - <entry> - <parameter>message</parameter> 㯠<parameter>destination - </parameter> ã§æå®ããããã¡ã¤ã«ã«è¿½å ããã¾ãã - </entry> - </row> - </tbody> - </tgroup> - </table> - </para> - <warning> - <para> - TCP/IPçµç±ã§ã®ãªã¢ã¼ããããã°ã¯ãPHP 3ã®æ©è½ã§ãããPHP 4ã§ã¯å© - ç¨ã§ãã¾ããã - </para> - </warning> - <para> - <example role="php"> - <title><function>error_log</function> ã®ä¾</title> - <programlisting role="php"> +<!-- EN-Revision: 1.13 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> +<refentry id="function.error-log"> + <refnamediv> + <refname>error_log</refname> + <refpurpose>ã¨ã©ã¼ã¡ãã»ã¼ã¸ãéä¿¡ãã</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>error_log</methodname> + <methodparam><type>string</type><parameter>message</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>message_type</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>destination</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>extra_headers</parameter></methodparam> + </methodsynopsis> + <para> + ã¨ã©ã¼ã¡ãã»ã¼ã¸ã Web ãµã¼ãã®ã¨ã©ã¼ãã°ã + <acronym>TCP</acronym> ãã¼ãããããã¯ãã¡ã¤ã«ã«éãã¾ãã + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>message</parameter></term> + <listitem> + <para> + ãã°ã«è¨é²ãããã¨ã©ã¼ã¡ãã»ã¼ã¸ã + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>message_type</parameter></term> + <listitem> + <para> + ã¡ãã»ã¼ã¸ãã©ãã«éãã®ããæå®ãã¾ãã以ä¸ã®ä¸ããæå®ã§ãã¾ãã + </para> + <para> + <table> + <title><function>error_log</function> ãã°ã¿ã¤ã</title> + <tgroup cols="2"> + <tbody> + <row> + <entry>0</entry> + <entry> + <parameter>message</parameter> ã¯ããªãã¬ã¼ãã£ã³ã°ã»ã·ã¹ãã + ã®ã·ã¹ãã ãã°ã®ã¡ã«ããºã ã¾ãã¯ãã¡ã¤ã«ã®ããããã使ã£ã¦ + PHP ã®ã·ã¹ãã ã»ãã¬ã¼ã«éããã¾ããã©ã¡ãã使ããããã¯ã + è¨å®ãã£ã¬ã¯ãã£ã <link linkend="ini.error-log">error_log</link> + ã®å 容ã«ããæ±ºå®ããã¾ããããã¯ããã©ã«ãã®ãªãã·ã§ã³ã§ãã + </entry> + </row> + <row> + <entry>1</entry> + <entry> + <parameter>message</parameter> ã¯ã<parameter>destination + </parameter> ãã©ã¡ã¼ã¿ã§æå®ãããã¢ãã¬ã¹ã«ãé»åã¡ã¼ã« + ã«ããéããã¾ãããã®ã¡ãã»ã¼ã¸ã¿ã¤ãã®å ´åã«ã®ã¿ã + 4 çªç®ã®ãã©ã¡ã¼ã¿ã§ãã <parameter>extra_headers</parameter> + ã使ããã¾ãã + </entry> + </row> + <row> + <entry>2</entry> + <entry> + <parameter>message</parameter> ã¯ãPHP ã®ãããã°ç¨æ¥ç¶ã + éãã¦éããã¾ãããã®ãªãã·ã§ã³ã¯ã + <link linkend="install.configure.enable-debugger"> + ãªã¢ã¼ããããã°ãæå¹ã«ãªã£ã¦ãã</link>å ´åã®ã¿ä½¿ç¨ã§ãã¾ãã + ãã®ã±ã¼ã¹ã§ã¯ã<parameter>destination</parameter> ãã©ã¡ã¼ã¿ã«ããã + ãããã°æ å ±ãåãåãã½ã±ããã®ãã¹ãåã¾ã㯠IP ã¢ãã¬ã¹ã + ããã³ãªãã·ã§ã³ã§ãã¼ãçªå·ãæå®ãã¾ãããã®ãªãã·ã§ã³ã¯ PHP 3 + ã§ã®ã¿æå¹ã§ãã + </entry> + </row> + <row> + <entry>3</entry> + <entry> + <parameter>message</parameter> 㯠<parameter>destination + </parameter> ã§æå®ããããã¡ã¤ã«ã«è¿½å ããã¾ãã + æç¤ºçã«æå®ããªãéãã<parameter>message</parameter> ã® + æå¾ã«ã¯æ¹è¡æåã¯è¿½å ããã¾ããã + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>destination</parameter></term> + <listitem> + <para> + ã¡ãã»ã¼ã¸ã®éä¿¡å ããã®è¨å®ã¯ãä¸ã§èª¬æãã¦ãã + <parameter>message</parameter> ãã©ã¡ã¼ã¿ã®å¤ã«ããã¾ãã + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>extra_headers</parameter></term> + <listitem> + <para> + 追å ã®ãããã<parameter>message</parameter> ãã©ã¡ã¼ã¿ã + <literal>1</literal> ã«è¨å®ãããå ´åã«å©ç¨ããã¾ãã + ãã®ã¡ãã»ã¼ã¸ã¿ã¤ãã¯ã<function>mail</function> ã¨åæ§ã« + å é¨é¢æ°ãå©ç¨ãã¾ãã + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example role="php"> + <title><function>error_log</function> ã®ä¾</title> + <programlisting role="php"> <![CDATA[ +<?php // ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ã§ããªãå ´åã // ãµã¼ããã°ãéãã¦ã¨ã©ã¼ãéç¥ããã -if (!Ora_Logon ($username, $password)) { - error_log ("ãªã©ã¯ã«ã®ãã¼ã¿ãã¼ã¹ã使ç¨ã§ãã¾ãã!", 0); +if (!Ora_Logon($username, $password)) { + error_log("ãªã©ã¯ã«ã®ãã¼ã¿ãã¼ã¹ã使ç¨ã§ãã¾ãã!", 0); } -// Foo ã«å¤±æãããã管çè ã« email ã§éç¥ãã -if (!($foo = allocate_new_foo()) { - error_log("大å¤ã§ãï¼ FOO ã«å¤±æãã¾ãã!", 1, - "operator@mydomain.com"); +// FOO ã«å¤±æãããã管çè ã« email ã§éç¥ãã +if (!($foo = allocate_new_foo())) { + error_log("大å¤ã§ããFOO ã«å¤±æãã¾ãã!", 1, + "operator@example.com"); } // ãã以å¤ã® error_log() ã®ã³ã¼ã«æ¹æ³ï¼ -error_log ("大å¤ã !", 2, "127.0.0.1:7000"); -error_log ("大å¤ã !", 2, "loghost"); -error_log ("大å¤ã !", 3, "/var/tmp/my-errors.log"); +error_log("大å¤ã !", 2, "127.0.0.1:7000"); +error_log("大å¤ã !", 2, "loghost"); +error_log("大å¤ã !", 3, "/var/tmp/my-errors.log"); +?> ]]> - </programlisting> - </example> - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/debug-backtrace.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-ja/reference/errorfunc/functions/debug-backtrace.xml diff -u phpdoc-ja/reference/errorfunc/functions/debug-backtrace.xml:1.2 phpdoc-ja/reference/errorfunc/functions/debug-backtrace.xml:1.3 --- phpdoc-ja/reference/errorfunc/functions/debug-backtrace.xml:1.2 Sun Jan 2 02:23:31 2005 +++ phpdoc-ja/reference/errorfunc/functions/debug-backtrace.xml Sat Aug 13 19:57:46 2005 @@ -1,27 +1,34 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.15 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> <refentry id="function.debug-backtrace"> <refnamediv> <refname>debug_backtrace</refname> - <refpurpose> - ããã¯ãã¬ã¼ã¹ãçæãã - </refpurpose> + <refpurpose>ããã¯ãã¬ã¼ã¹ãçæãã</refpurpose> </refnamediv> - <refsect1> - <title>説æ</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>debug_backtrace</methodname> <void/> </methodsynopsis> <para> - <function>debug_backtrace</function>ã¯ãPHPããã¯ãã¬ã¼ã¹ãçæãã - ãã®æ å ±ã飿³é åã¨ãã¦è¿ãã¾ããè¿ãããå¯è½æ§ãããè¦ç´ ã以ä¸ã® - 表ã«ç¤ºãã¾ãã + <function>debug_backtrace</function> 㯠PHP ããã¯ãã¬ã¼ã¹ãçæãã¾ãã + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 飿³é åãè¿ãã¾ãã飿³é åã®è¦ç´ ã¨ãã¦è¿ãããå¯è½æ§ããããã®ã¯ + 以ä¸ã®ã¨ããã§ãã </para> <para> <table> <title> - <function>debug_backtrace</function>ããè¿ãããå¯è½æ§ãããè¦ç´ + <function>debug_backtrace</function> ããè¿ãããå¯è½æ§ãããè¦ç´ </title> <tgroup cols="3"> <thead> @@ -73,7 +80,9 @@ <entry>type</entry> <entry><type>string</type></entry> <entry> - ã«ã¬ã³ãã®ã¯ã©ã¹åã + ã«ã¬ã³ãã®ã³ã¼ã«æ¹å¼ãã¡ã½ããå¼ã³åºãã®å ´å㯠"->"ãéçãªã¡ã½ãã + å¼ã³åºãã®å ´å㯠"::" ãè¿ããã¾ãã颿°å¼ã³åºãã®å ´å㯠+ ä½ãè¿ããã¾ããã </entry> </row> <row> @@ -89,40 +98,43 @@ </tgroup> </table> </para> - <para> - 以ä¸ã«ç°¡åãªä¾ã示ãã¾ãã - </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> - <title> - <function>debug_backtrace</function>ã®ä¾ - </title> + <title><function>debug_backtrace</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ -// ãã¡ã¤ã«å: a.php <?php +// ãã¡ã¤ã«å: a.php -function a_test($str) { - - print "\nHi: $str"; - +function a_test($str) +{ + echo "\nHi: $str"; var_dump(debug_backtrace()); } a_test('friend'); ?> -// ãã¡ã¤ã«å: b.php <?php +// ãã¡ã¤ã«å: b.php include_once '/tmp/a.php'; ?> - -/* /tmp/b.php ãå®è¡ããéã®çµæ - +]]> + </programlisting> + <para> + <filename>/tmp/b.php</filename> ãå®è¡ããéã®çµæã¯ + 以ä¸ã®ããã«ãªãã¾ãã + </para> + <screen> +<![CDATA[ Hi: friend array(2) { - [0]=> - array(4) { +[0]=> +array(4) { ["file"] => string(10) "/tmp/a.php" ["line"] => int(10) ["function"] => string(6) "a_test" @@ -130,25 +142,31 @@ array(1) { [0] => &string(6) "friend" } - } - [1]=> - array(4) { +} +[1]=> +array(4) { ["file"] => string(10) "/tmp/b.php" ["line"] => int(2) - ["args"] => + ["args"] => array(1) { [0] => string(10) "/tmp/a.php" } ["function"] => string(12) "include_once" } } -*/ ]]> - </programlisting> + </screen> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - <function>trigger_error</function>ãåç §ãã¦ãã ããã + <simplelist> + <member><function>trigger_error</function></member> + <member><function>debug_print_backtrace</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/ini.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/errorfunc/ini.xml diff -u phpdoc-ja/reference/errorfunc/ini.xml:1.5 phpdoc-ja/reference/errorfunc/ini.xml:1.6 --- phpdoc-ja/reference/errorfunc/ini.xml:1.5 Sun Jan 2 02:23:31 2005 +++ phpdoc-ja/reference/errorfunc/ini.xml Sat Aug 13 19:57:46 2005 @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.5 $ --> -<!-- EN-Revision: 1.20 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.6 $ --> +<!-- EN-Revision: 1.28 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> <section id="errorfunc.configuration"> &reftitle.runtime; &extension.runtime; @@ -13,94 +14,110 @@ <entry>åå</entry> <entry>ããã©ã«ã</entry> <entry>夿´ã®å¯å¦</entry> + <entry>夿´å±¥æ´</entry> </row> </thead> <tbody> <row> <entry>error_reporting</entry> - <entry>E_ALL & ~E_NOTICE</entry> + <entry>NULL</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>display_errors</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>display_startup_errors</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.0.3 以éã§æå¹ã§ãã</entry> </row> <row> <entry>log_errors</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>log_errors_max_len</entry> <entry>"1024"</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.3.0 以éã§æå¹ã§ãã</entry> </row> <row> <entry>ignore_repeated_errors</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.3.0 以éã§æå¹ã§ãã</entry> </row> <row> <entry>ignore_repeated_source</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.3.0 以éã§æå¹ã§ãã</entry> </row> <row> <entry>report_memleaks</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.3.0 以éã§æå¹ã§ãã</entry> </row> <row> <entry>track_errors</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>html_errors</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP <= 4.2.3 ã§ã¯ PHP_INI_SYSTEM ãPHP 4.0.2 以éã§æå¹ã§ãã</entry> </row> <row> <entry>docref_root</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.3.0 以éã§æå¹ã§ãã</entry> </row> <row> <entry>docref_ext</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.3.2 以éã§æå¹ã§ãã</entry> </row> <row> <entry>error_prepend_string</entry> <entry>NULL</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>error_append_string</entry> <entry>NULL</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>error_log</entry> <entry>NULL</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>warn_plus_overloading</entry> <entry>NULL</entry> <entry>PHP_INI??</entry> + <entry></entry> </row> </tbody> </tgroup> </table> - PHP_INI_* 宿°ã®è©³ç´°ããã³å®ç¾©ã«ã¤ãã¦ã¯ã - <function>ini_set</function>ãåç §ãã¦ãã ããã + &ini.php.constants; </para> <para> 以ä¸ã«è¨å®ãã£ã¬ã¯ãã£ãã®ç°¡åãªèª¬æã示ãã¾ãã @@ -174,6 +191,14 @@ 使ç¨ãã¹ãã§ã¯ããã¾ãããï¼ä¾ãã°ã¤ã³ã¿ã¼ãããã«æ¥ç¶ãããã·ã¹ãã ãªã©ï¼ </para> </note> + <note> + <para> + display_errors ã¯å®è¡æã«ãè¨å®å¯è½ï¼<function>ini_set</function> + 颿°ãç¨ãã¦ï¼ã§ãããã¹ã¯ãªãããè´å½çï¼fatalï¼ãªã¨ã©ã¼ãçºçããå ´å㯠+ ãã®è¨å®ã¯åæ ããã¾ããããªããªããè¦æ±ãããã¢ã¯ã·ã§ã³ã¯ + å®è¡ãããªãã£ãããã§ãã + </para> + </note> </listitem> </varlistentry> @@ -220,10 +245,10 @@ <para> log_errorsã®æå¤§é·ããããã¤ãåä½ã§è¨å®ãã¾ãã <link linkend="ini.error-log">error_log</link> ã«ã¯ã - ãã®è¨å®ã§æ å ±ã追å ããã¾ããããã©ã«ãã¯1024ã§ã0ãæå®ãã㨠+ ãã®è¨å®ã§æ å ±ã追å ããã¾ããããã©ã«ã㯠1024 ã§ã0 ãæå®ãã㨠æå¤§é·ã®å¶éã¯å ¨ãé©ç¨ãããªããªãã¾ãã ãã®é·ãã¯ã¨ã©ã¼ãã°ã«è¨é²ããã - ã¨ã©ã¼è¡¨ç¤ºã¨<link + ã¨ã©ã¼è¡¨ç¤ºã¨ <link linkend="reserved.variables.phperrormsg">$php_errormsg</link> ã«é©ç¨ããã¾ãã </para> @@ -385,11 +410,11 @@ <para> ã¹ã¯ãªããã¨ã©ã¼ãè¨é²ããããã¡ã¤ã«åã§ãã ãã¡ã¤ã«ã¯ã¦ã§ããµã¼ãã¦ã¼ã¶ã§æ¸ãè¾¼ããªããã°ãªãã¾ããã - <literal>syslog</literal>ãæå®ãããã¨ãã¨ã©ã¼ã¯ãã¡ã¤ã«ã§ã¯ãªã - ã·ã¹ãã ãã¬ã¼ã«éããã¾ããããã¯UNIXã§ã¯syslog(3)ã§ãã - Windows NTã§ã¯ã¤ãã³ããã°ã®ãã¨ã§ããã·ã¹ãã ãã¬ã¼ã¯ - Windows95ã§ã¯ãµãã¼ãããã¦ãã¾ããã - <function>syslog</function>ãåç §ãã¦ãã ããã + <literal>syslog</literal> ãæå®ãããã¨ãã¨ã©ã¼ã¯ãã¡ã¤ã«ã§ã¯ãªã + ã·ã¹ãã ãã¬ã¼ã«éããã¾ãããã㯠UNIX ã§ã¯ syslog(3) ã§ãã + Windows NT ã§ã¯ã¤ãã³ããã°ã®ãã¨ã§ããã·ã¹ãã ãã¬ã¼ã¯ + Windows 95 ã§ã¯ãµãã¼ãããã¦ãã¾ããã + <function>syslog</function> ãåç §ãã¦ãã ããã </para> </listitem> </varlistentry>
http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/user-error.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/errorfunc/functions/user-error.xml diff -u phpdoc-ja/reference/errorfunc/functions/user-error.xml:1.4 phpdoc-ja/reference/errorfunc/functions/user-error.xml:1.5 --- phpdoc-ja/reference/errorfunc/functions/user-error.xml:1.4 Sun Jan 2 02:23:31 2005 +++ phpdoc-ja/reference/errorfunc/functions/user-error.xml Sat Aug 13 19:57:46 2005 @@ -1,33 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./ja/functions/errorfunc.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.1 Maintainer: hirokawa Status: ready --> - <refentry id="function.user-error"> - <refnamediv> - <refname>user_error</refname> - <refpurpose> - ã¦ã¼ã¶ã¬ãã«ã®ã¨ã©ã¼/è¦å/éç¥ã¡ãã»ã¼ã¸ãçºçãã - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <methodsynopsis> - <type>void</type><methodname>user_error</methodname> - <methodparam><type>string</type><parameter>error_msg</parameter></methodparam> - <methodparam><type>int</type><parameter> - <replaceable><optional>error_type</optional></replaceable> - </parameter></methodparam> - </methodsynopsis> - <para> - ããã¯ã<function>trigger_error</function>ã¸ã®ã¨ã¤ãªã¢ã¹ã§ãã - </para> - <para> - <function>error_reporting</function>, - <function>set_error_handler</function>, - <function>restore_error_handler</function>, - <function>trigger_error</function>ãåç §ãã ããã - </para> - </refsect1> - </refentry> +<!-- EN-Revision: 1.6 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> +<refentry id="function.user-error"> + <refnamediv> + <refname>user_error</refname> + <refpurpose><function>trigger_error</function> ã®ã¨ã¤ãªã¢ã¹</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <para> + &info.function.alias; + <function>trigger_error</function>. + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/trigger-error.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/errorfunc/functions/trigger-error.xml diff -u phpdoc-ja/reference/errorfunc/functions/trigger-error.xml:1.4 phpdoc-ja/reference/errorfunc/functions/trigger-error.xml:1.5 --- phpdoc-ja/reference/errorfunc/functions/trigger-error.xml:1.4 Sun Jan 2 02:23:31 2005 +++ phpdoc-ja/reference/errorfunc/functions/trigger-error.xml Sat Aug 13 19:57:46 2005 @@ -1,55 +1,100 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./ja/functions/errorfunc.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.1 Maintainer: hirokawa Status: ready --> - <refentry id="function.trigger-error"> - <refnamediv> - <refname>trigger_error</refname> - <refpurpose> - ã¦ã¼ã¶ã¬ãã«ã®ã¨ã©ã¼/è¦å/éç¥ã¡ãã»ã¼ã¸ãçæãã - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <methodsynopsis> - <type>void</type><methodname>trigger_error</methodname> - <methodparam><type>string</type><parameter>error_msg</parameter></methodparam> - <methodparam><type>int</type><parameter> - <replaceable><optional>error_type</optional></replaceable> - </parameter></methodparam> - </methodsynopsis> +<!-- EN-Revision: 1.12 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> +<refentry id="function.trigger-error"> + <refnamediv> + <refname>trigger_error</refname> + <refpurpose>ã¦ã¼ã¶ã¬ãã«ã®ã¨ã©ã¼/è¦å/éç¥ã¡ãã»ã¼ã¸ãçæãã</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>trigger_error</methodname> + <methodparam><type>string</type><parameter>error_msg</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>error_type</parameter></methodparam> + </methodsynopsis> + <para> + ã¦ã¼ã¶ã¨ã©ã¼ãçºçããããã«ä½¿ç¨ãããçµè¾¼ã®ã¨ã©ã¼ãã³ãã©ã¾ã㯠+ æ°ããã¨ã©ã¼ãã³ãã©(<function>set_error_handler</function>) + ã¨ãã¦è¨å®æ¸ã®ã¦ã¼ã¶å®ç¾©é¢æ°ã¨çµã¿åããã¦ä½¿ç¨ããã¾ãã + </para> + <para> + ãã®é¢æ°ã¯ãå®è¡æã®ä¾å¤ã«ç¹å®ã®å¿çãçæããå¿ è¦ãããå ´åã« + 便å©ã§ãã + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>error_msg</parameter></term> + <listitem> + <para> + ãã®ã¨ã©ã¼ã«å²ãå½ã¦ãããã¡ãã»ã¼ã¸ãé·ãã¯æå¤§ 1024 æåã¾ã§ã§ãã + 1024 æåãè¶ ããé¨åã¯åãæ¨ã¦ããã¾ãã + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>error_type</parameter></term> + <listitem> + <para> + ãã®ã¨ã©ã¼ã«å²ãå½ã¦ãããã¨ã©ã¼åãE_USER é¢é£ã®å®æ°ã®ã¿ãæå®å¯è½ã§ã + ããã©ã«ã㯠<constant>E_USER_NOTICE</constant> ã§ãã + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + ãã®é¢æ°ã¯ãééã£ã <parameter>error_type</parameter> ãæå®ãããå ´åã« + &false; ãããã以å¤ã®å ´åã« &true; ãè¿ãã¾ãã + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>trigger_error</function> ã®ä¾</title> <para> - ã¦ã¼ã¶ã¨ã©ã¼ãçºçããããã«ä½¿ç¨ãããçµè¾¼ã®ã¨ã©ã¼ãã³ãã©ã¾ã㯠- æ°ããã¨ã©ã¼ãã³ãã©(<function>set_error_handler</function>)ã¨ã - ã¦è¨å®æ¸ã®ã¦ã¼ã¶å®ç¾©é¢æ°ã¨çµã¿åããã¦ä½¿ç¨ããã¾ããã¨ã©ã¼åã«ã¯ - E_USER é¢é£ã®å®æ°ã®ã¿ã使ç¨å¯è½ã§ãããã©ã«ã㯠- <constant>E_USER_NOTICE</constant>ã¨ãªã£ã¦ãã¾ãã + ããæ¡å¼µããä¾ã«ã¤ãã¦ã¯ <function>set_error_handler</function> + ãåç §ãã ããã </para> - <para> - ãã®é¢æ°ã¯ãå®è¡æã®ä¾å¤ã«ç¹å®ã®å¿çãçæããå¿ è¦ãããå ´åã«æ - ç¨ã§ãã以ä¸ã«ä¾ã示ãã¾ãã - <informalexample> - <programlisting> + <programlisting role="php"> <![CDATA[ -if (assert ($divisor == 0)) - trigger_error ("Cannot divide by zero", E_USER_ERROR); +<?php +if (assert($divisor == 0)) { + trigger_error("Cannot divide by zero", E_USER_ERROR); +} +?> ]]> - </programlisting> - </informalexample> - <note> - <para> - ããã詳細ãªä¾ã«ã¤ãã¦ã¯ã - <function>set_error_handler</function> ãåç §ãã ããã - </para> - </note> - </para> - <para> - <function>error_reporting</function>, - <function>set_error_handler</function>, - <function>restore_error_handler</function>, - <function>user_error</function>ãåç §ãã ããã - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>error_reporting</function></member> + <member><function>set_error_handler</function></member> + <member><function>restore_error_handler</function></member> + <member>The <link linkend="errorfunc.constants">ã¨ã©ã¼ã¬ãã«å®æ°</link></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/set-exception-handler.xml?r1=1.1&r2=1.2&ty=u Index: phpdoc-ja/reference/errorfunc/functions/set-exception-handler.xml diff -u phpdoc-ja/reference/errorfunc/functions/set-exception-handler.xml:1.1 phpdoc-ja/reference/errorfunc/functions/set-exception-handler.xml:1.2 --- phpdoc-ja/reference/errorfunc/functions/set-exception-handler.xml:1.1 Thu Dec 30 08:04:09 2004 +++ phpdoc-ja/reference/errorfunc/functions/set-exception-handler.xml Sat Aug 13 19:57:46 2005 @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.1 $ --> -<!-- EN-Revision: 1.4 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.2 $ --> +<!-- EN-Revision: 1.7 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> <refentry id="function.set-exception-handler"> <refnamediv> <refname>set_exception_handler</refname> @@ -15,31 +16,17 @@ <methodparam><type>callback</type><parameter>exception_handler</parameter></methodparam> </methodsynopsis> <para> - ä¾å¤ãtry/catchãããã¯ã®ä¸ã§ãã£ãããããªãã£ãå ´åã® + ä¾å¤ã try/catch ãããã¯ã®ä¸ã§ãã£ãããããªãã£ãå ´åã® ããã©ã«ãã®ä¾å¤ãã³ãã©ãè¨å®ãã¾ãã ä¾å¤ã¯ã<parameter>exception_handler</parameter> ãã³ã¼ã«ãããå¾ã« 忢ãã¾ãã </para> <para> <parameter>exception_handler</parameter> ã¯ã - <function>set_exception_handler</function>ãã³ã¼ã«ããåã« - å®ç¾©ããå¿ è¦ãããã¾ãããã®é¢æ°ã¯ããã©ã¡ã¼ã¿ãä¸ã¤ + <function>set_exception_handler</function> ãã³ã¼ã«ããåã« + å®ç¾©ããå¿ è¦ãããã¾ãããã®ãã³ãã©é¢æ°ã¯ããã©ã¡ã¼ã¿ãã²ã¨ã¤ ã¨ãå¿ è¦ãããã¾ãã ãã®ãã©ã¡ã¼ã¿ã¯ãã¹ãã¼ãããä¾å¤ãªãã¸ã§ã¯ãã¨ãªãã¾ãã - <methodsynopsis> - <methodname><replaceable>exception_handler</replaceable></methodname> - <methodparam><type>object</type><parameter>exception</parameter></methodparam> - </methodsynopsis> - <variablelist> - <varlistentry> - <term><parameter>exception</parameter></term> - <listitem> - <para> - ãã£ãããããªãä¾å¤ãçºçããéã«ã³ã¼ã«ããã颿°ã®åå - </para> - </listitem> - </varlistentry> - </variablelist> </para> </refsect1> <refsect1> @@ -60,7 +47,7 @@ <refsect1> &reftitle.returnvalues; <para> - åã«å®ç¾©ãããä¾å¤ãã³ãã©ã¾ãã¯ã¨ã©ã¼çºçæã«&false;ãè¿ãã¾ãã + åã«å®ç¾©ãããä¾å¤ãã³ãã©ã®ååãã¾ãã¯ã¨ã©ã¼çºçæã« &false; ãè¿ãã¾ãã åã«ãã³ãã©ãå®ç¾©ããã¦ããªãå ´åãç©ºã®æååãè¿ããã¾ãã </para> </refsect1> @@ -89,10 +76,11 @@ <refsect1> &reftitle.seealso; <para> - <function>restore_exception_handler</function> - <function>restore_error_handler</function> - <function>error_reporting</function>&listendand; - <link linkend="language.oop5.exceptions">PHP 5ä¾å¤</link> + <function>restore_exception_handler</function>, + <function>restore_error_handler</function>, + <function>error_reporting</function>, + &seealso.callback;, &listendand; + <link linkend="language.exceptions">PHP 5 ä¾å¤</link>. </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/set-error-handler.xml?r1=1.6&r2=1.7&ty=u Index: phpdoc-ja/reference/errorfunc/functions/set-error-handler.xml diff -u phpdoc-ja/reference/errorfunc/functions/set-error-handler.xml:1.6 phpdoc-ja/reference/errorfunc/functions/set-error-handler.xml:1.7 --- phpdoc-ja/reference/errorfunc/functions/set-error-handler.xml:1.6 Sun Jan 2 02:23:31 2005 +++ phpdoc-ja/reference/errorfunc/functions/set-error-handler.xml Sat Aug 13 19:57:46 2005 @@ -1,14 +1,16 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.6 $ --> -<!-- EN-Revision: 1.24 Maintainer: hirokawa Status: ready --> - <refentry id="function.set-error-handler"> +<!-- $Revision: 1.7 $ --> +<!-- EN-Revision: 1.30 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> +<refentry id="function.set-error-handler"> <refnamediv> <refname>set_error_handler</refname> <refpurpose> ã¦ã¼ã¶å®ç¾©ã®ã¨ã©ã¼ãã³ãã©é¢æ°ãè¨å®ãã </refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>mixed</type><methodname>set_error_handler</methodname> @@ -18,198 +20,278 @@ <para> ã¹ã¯ãªããã®ã¨ã©ã¼å¦çãè¡ãã¦ã¼ã¶é¢æ° (<parameter>error_handler</parameter>)ãè¨å®ãã¾ãã - åã«å®ç¾©ãããã¨ã©ã¼ãã³ãã©(ããå ´å)ãå«ãæååã¾ã㯠- ã¨ã©ã¼ã®å ´åã« &false; ãè¿ãã¾ãã - åã«å®ç¾©ããããã³ãã©ãã¯ã©ã¹ã¡ã½ããã®å ´åããã®é¢æ°ã¯ã - ã¯ã©ã¹ã¨ã¡ã½ããåãããªãæ·»åé åãè¿ãã¾ãã </para> <para> ãã®é¢æ°ã¯ãå®è¡æã®ã¨ã©ã¼å¦çãã¦ã¼ã¶ãå®ç¾©ããããã«ä½¿ç¨ãã¾ãã - ä¾ãã°ãè´å½çãªã¨ã©ã¼ãçºçããå ´åããããæ¡ä»¶ã®ãã¨ã« - (<function>trigger_error</function>ã使ç¨ãã¦)ã¨ã©ã¼ãçºçããå¿ - è¦ãããå ´åã«ãã¼ã¿ããã¡ã¤ã«ãæ¶å»ããå¿ è¦ããããããªã¢ããªã±ã¼ - ã·ã§ã³ããã®å ´åã«ãããã¾ãã - </para> - <para> - äºçªç®ã®ãã©ã¡ã¼ã¿<parameter>error_types</parameter>ã¯ãPHP 5ã§å°å ¥ããã - è¨å®ãã©ã¡ã¼ã¿ - <link linkend="ini.error-reporting">error_reporting</link>㨠- å ¨ãåæ§ã«ã表示ããã¨ã©ã¼ãå¶å¾¡ããããã« - <parameter>error_handler</parameter>èµ·åããã¹ã¯ããéã« - 使ç¨å¯è½ã§ãã - ãã®ãã¹ã¯ãæå®ããªãå ´åã - <parameter>error_handler</parameter>㯠- <link - linkend="ini.error-reporting">error_reporting</link>ã®è¨å®ã«ããã - å ¨ã¦ã®ã¨ã©ã¼ã«é¢ãã¦ã³ã¼ã«ããã¾ãã - </para> - <para> - ã¦ã¼ã¶é¢æ°ã¯ãäºã¤ã®å¼æ°ãã¨ã©ã¼ã³ã¼ãã¨ã¨ã©ã¼ãè¨è¿°ããæååãåãåã - å¿ è¦ãããã¾ããPHP 4.0.2 ãããªãã·ã§ã³ã®ãã©ã¡ã¼ã¿ã¨ãã¦3ã¤ã®å¼æ°ã - 追å ããã¦ãã¾ãããããã¯ãã¨ã©ã¼ãçºçãããã¡ã¤ã«åãã¨ã©ã¼ãçºçããè¡ã - çºçããã¨ã©ã¼ã®ã³ã³ããã¹ã(ã¨ã©ã¼ãçºçããå ´æã§ã®ã¢ã¯ãã£ããªã·ã³ãã«ãã¼ã - ã«ãæãé å)ã§ãã - 颿°ã¯ã以ä¸ã®ããã«è¡¨ããã¾ãã - <methodsynopsis> - <methodname><replaceable>handler</replaceable></methodname> - <methodparam><type>int</type><parameter>errno</parameter></methodparam> - <methodparam><type>string</type><parameter>errstr</parameter></methodparam> - <methodparam choice="opt"><type>string</type><parameter>errfile</parameter></methodparam> - <methodparam choice="opt"><type>int</type><parameter>errline</parameter></methodparam> - <methodparam choice="opt"><type>array</type><parameter>errcontext</parameter></methodparam> - </methodsynopsis> + ä¾ãã°ãè´å½çãªã¨ã©ã¼ã®éã«ãã¼ã¿ããã¡ã¤ã«ãæ¶å»ããå¿ è¦ããããã㪠+ ã¢ããªã±ã¼ã·ã§ã³ããããæ¡ä»¶ã®ãã¨ã« + (<function>trigger_error</function>ã使ç¨ãã¦)ã¨ã©ã¼ãçºçããå¿ è¦ããã + ã¢ããªã±ã¼ã·ã§ã³ããã®å ´åã«ãããã¾ãã + </para> + <para> + PHP ã®æ¨æºã®ã¨ã©ã¼ãã³ãã©ã¯å®å ¨ã«ãã¤ãã¹ããããã¨ã«æ³¨æãã¦ãã ããã + <function>error_reporting</function> ã®è¨å®ã«ããããããã©ã®ãããªå ´åã§ã + ã¦ã¼ã¶ãè¨å®ããã¨ã©ã¼ãã³ãã©ãã³ã¼ã«ããã¾ãããã ãããã®å ´åã§ã + ãã³ãã©ã§ <function>error_reporting</function> ã®ã«ã¬ã³ãã®å¤ãèªã¿ã + ããã«ãããã¦é©åã«åä½ããããã¨ã¯å¯è½ã§ããã¨ã©ã¼ãçºçããå½ä»¤ã®åã« + <link linkend="language.operators.errorcontrol">@ ã¨ã©ã¼å¶å¾¡æ¼ç®å + </link> ãä»å ããã¦ããå ´åããã®å¤ã¯ 0 ã¨ãªããã¨ã«ã¯æ³¨æãã¾ãããã + </para> + <para> + ã¦ã¼ã¶ãã³ãã©é¢æ°ã¯ãå¿ è¦ã«å¿ã㦠<function>die</function> ã + ã³ã¼ã«ãã責任ããããã¨ã«ã注æãã¾ããããã¨ã©ã¼ãã³ãã©é¢æ°ã + ãªã¿ã¼ã³ããå ´åãã¹ã¯ãªããã®å®è¡ã¯ãã¨ã©ã¼ãçºçããå½ä»¤ã®æ¬¡ã®å½ä»¤ã« + ç¶ç¶ããã¾ãã + </para> + <para> + 以ä¸ã®ã¨ã©ã¼ã¿ã¤ãã¯ãã¦ã¼ã¶å®ç¾©ã®é¢æ°ã§ã¯æ±ãã¾ããã + <constant>E_ERROR</constant>, <constant>E_PARSE</constant>, + <constant>E_CORE_ERROR</constant>, <constant>E_CORE_WARNING</constant>, + <constant>E_COMPILE_ERROR</constant>, + <constant>E_COMPILE_WARNING</constant> ããã³ + <function>set_error_handler</function> ãã³ã¼ã«ããããã¡ã¤ã«ã§çºçãã + 大åã® <constant>E_STRICT</constant> ã + </para> + <para> + (ãã¡ã¤ã«ã¢ãããã¼ãã®ããã«)ã¹ã¯ãªãããå®è¡ãããåã«ã¨ã©ã¼ã + çºçããå ´åãã«ã¹ã¿ã ã¨ã©ã¼ãã³ãã©ã¯ã³ã¼ã«ããã¾ããã + ããã¯ããã®æç¹ã§ã¯ç»é²ããã¦ããªãããã§ãã + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> <variablelist> <varlistentry> - <term><parameter>errno</parameter></term> - <listitem> - <simpara> - The first parameter, <replaceable>errno</replaceable>, contains the - level of the error raised, as an integer. - </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>errstr</parameter></term> - <listitem> - <simpara> - The second parameter, <parameter>errstr</parameter>, contains the - error message, as a string. - </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>errfile</parameter></term> - <listitem> - <simpara> - The third parameter is optional, <parameter>errfile</parameter>, - which contains the filename that the error was raised in, as a string. - </simpara> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>errline</parameter></term> + <term><parameter>error_handler</parameter></term> <listitem> - <simpara> - The fourth parameter is optional, <parameter>errline</parameter>, - which contains the line number the error was raised at, as an integer. - </simpara> + <para> + ã¦ã¼ã¶é¢æ°ã¯ãã¨ã©ã¼ã³ã¼ãã¨ã¨ã©ã¼ãè¨è¿°ããæååã® 2 ã¤ã®å¼æ°ã + åãåãå¿ è¦ãããã¾ããããã«ãªãã·ã§ã³ã®ãã©ã¡ã¼ã¿ã¨ã㦠3 ã¤ã®å¼æ°ã + 追å ããã¦ãã¾ãããããã¯ãã¨ã©ã¼ãçºçãããã¡ã¤ã«åãã¨ã©ã¼ã + çºçããè¡ãçºçããã¨ã©ã¼ã®ã³ã³ããã¹ã(ã¨ã©ã¼ãçºçããå ´æã§ã® + ã¢ã¯ãã£ããªã·ã³ãã«ãã¼ãã«ãæãé å)ã§ãã颿°ã¯ä»¥ä¸ã®ããã«ãªãã¾ãã + </para> + <para> + <methodsynopsis> + <methodname><replaceable>handler</replaceable></methodname> + <methodparam><type>int</type><parameter>errno</parameter></methodparam> + <methodparam><type>string</type><parameter>errstr</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>errfile</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>errline</parameter></methodparam> + <methodparam choice="opt"><type>array</type><parameter>errcontext</parameter></methodparam> + </methodsynopsis> + <variablelist> + <varlistentry> + <term><parameter>errno</parameter></term> + <listitem> + <simpara> + æåã®ãã©ã¡ã¼ã¿ <parameter>errno</parameter> ã¯ãçºçããã + ã¨ã©ã¼ã®ã¬ãã«ãæ´æ°ã§æ ¼ç´ãã¾ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>errstr</parameter></term> + <listitem> + <simpara> + 2 çªç®ã®ãã©ã¡ã¼ã¿ <parameter>errstr</parameter> ã¯ã + ã¨ã©ã¼ã¡ãã»ã¼ã¸ãæååã§æ ¼ç´ãã¾ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>errfile</parameter></term> + <listitem> + <simpara> + 3 çªç®ã®ãã©ã¡ã¼ã¿ <parameter>errfile</parameter> ã¯ãªãã·ã§ã³ã§ã + ã¨ã©ã¼ãçºçãããã¡ã¤ã«ã®ååãæååã§æ ¼ç´ãã¾ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>errline</parameter></term> + <listitem> + <simpara> + 4 çªç®ã®ãã©ã¡ã¼ã¿ <parameter>errline</parameter> ã¯ãªãã·ã§ã³ã§ã + ã¨ã©ã¼ãçºçããè¡çªå·ãæ´æ°ã§æ ¼ç´ãã¾ãã + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>errcontext</parameter></term> + <listitem> + <simpara> + 5 çªç®ã®ãã©ã¡ã¼ã¿ <parameter>errcontext</parameter> ã¯ãªãã·ã§ã³ã§ã + ã¨ã©ã¼ãçºçããå ´æã®ã¢ã¯ãã£ãã·ã³ãã«ãã¼ãã«ãæãé åã§ãã + ã¤ã¾ããã¨ã©ã¼ãçºçããã¹ã³ã¼ãå ã§ã®ãã¹ã¦ã®å¤æ°ã®å å®¹ãæ ¼ç´ãã + é åã <parameter>errcontext</parameter> ã ã¨ãããã¨ã§ãã + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> </listitem> </varlistentry> <varlistentry> - <term><parameter>errcontext</parameter></term> + <term><parameter>error_types</parameter></term> <listitem> - <simpara> - The fifth parameter is optional, <parameter>errcontext</parameter>, - which is an array that points to the active symbol table at the point - the error occurred. In other words, <parameter>errcontext</parameter> - will contain an array of every variable that existed in the scope the - error was triggered in. - </simpara> + <para> + è¨å®ãã©ã¡ã¼ã¿ + <link linkend="ini.error-reporting">error_reporting</link> + ã§è¡¨ç¤ºããã¨ã©ã¼ãå¶å¾¡ããã®ã¨å ¨ãåæ§ã«ã + <parameter>error_handler</parameter> ã®èµ·åãå¶å¾¡ããéã« + 使ç¨å¯è½ã§ãã + ãã®ãã¹ã¯ãæå®ããªãå ´åã + <parameter>error_handler</parameter> 㯠+ <link + linkend="ini.error-reporting">error_reporting</link> ã®è¨å®ã«ããã + å ¨ã¦ã®ã¨ã©ã¼ã«é¢ãã¦ã³ã¼ã«ããã¾ãã + </para> </listitem> </varlistentry> - </variablelist> + </variablelist> </para> - <note> - <simpara> - 颿°åã®ä»£ããã«ãªãã¸ã§ã¯ãã¸ã®ãªãã¡ã¬ã³ã¹ã¨ã¡ã½ããåãå«ãé å - ãæå®ãããã¨ãã§ãã¾ãã(PHP 4.3.0以é) - </simpara> - </note> - <note> - <para> - 以ä¸ã®ã¨ã©ã¼åã¯ã¦ã¼ã¶å®ç¾©é¢æ°ã§ã¯æ±ããã¨ãã§ãã¾ããã - <constant>E_ERROR</constant>, <constant>E_PARSE</constant>, - <constant>E_CORE_ERROR</constant>, <constant>E_CORE_WARNING</constant>, - <constant>E_COMPILE_ERROR</constant>, - <constant>E_COMPILE_WARNING</constant> - </para> - </note> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + åã«å®ç¾©ãããã¨ã©ã¼ãã³ãã©(ããå ´å)ãå«ãæååãã¾ã㯠+ ã¨ã©ã¼ã®å ´åã«ã¯ &false; ãè¿ãã¾ãã + åã«å®ç¾©ããããã³ãã©ãã¯ã©ã¹ã¡ã½ããã®å ´åããã®é¢æ°ã¯ã + ã¯ã©ã¹ã¨ã¡ã½ããåãããªãæ·»åé åãè¿ãã¾ãã + </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>5.0.0</entry> + <entry> + <parameter>error_types</parameter> ãã©ã¡ã¼ã¿ã追å ããã¾ããã + </entry> + </row> + <row> + <entry>4.3.0</entry> + <entry> + <parameter>error_handler</parameter> ã¨ãã¦ã颿°åã®ãããã« + ãªãã¸ã§ã¯ãã¸ã®ãªãã¡ã¬ã³ã¹ã¨ã¡ã½ããåãå«ãé åãæå®ãããã¨ã + ã§ãã¾ãã + </entry> + </row> + <row> + <entry>4.0.2</entry> + <entry> + ã¦ã¼ã¶å®ç¾©é¢æ° <parameter>error_handler</parameter> ã§ 3 ã¤ã® + ãªãã·ã§ã³ãã©ã¡ã¼ã¿ãå©ç¨ã§ããããã«ãªãã¾ãããfilename, line number, + ããã³ context ã§ãã + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> - 以ä¸ã®ä¾ã§ã¯ãã¨ã©ã¼ãçºçãããã¨ã«ããå é¨ä¾å¤ã®å¦çã表示ãã - ã¦ã¼ã¶å®ç¾©é¢æ°ã«ãããããå¦çãã¾ãã <example> <title> - <function>set_error_handler</function>ããã³ - <function>trigger_error</function>ã«ããã¨ã©ã¼å¦ç + <function>set_error_handler</function> ããã³ + <function>trigger_error</function> ã«ããã¨ã©ã¼å¦ç </title> + <para> + 以ä¸ã®ä¾ã§ã¯ãã¨ã©ã¼ãçºçããããã¨ã«ããå é¨ä¾å¤ã®å¦çã + ããããã¦ã¼ã¶å®ç¾©é¢æ°ã§å¦çããæ¹æ³ã説æãã¾ãã + </para> <programlisting role="php"> <![CDATA[ <?php - -// ã¦ã¼ã¶ã¨ã©ã¼å®æ°ã«ããåå®ç¾© - PHP4 ã®ã¿ -define("FATAL",E_USER_ERROR); -define("ERROR",E_USER_WARNING); -define("WARNING",E_USER_NOTICE); - // ãã®ã¹ã¯ãªããã®ã¨ã©ã¼åºåã¬ãã«ãè¨å® -error_reporting (FATAL | ERROR | WARNING); +error_reporting(E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE); // ã¨ã©ã¼ãã³ãã©é¢æ° -function myErrorHandler ($errno, $errstr, $errfile, $errline) { +function myErrorHandler($errno, $errstr, $errfile, $errline) +{ switch ($errno) { - case FATAL: - echo "<b>FATAL</b> [$errno] $errstr<br>\n"; - echo " Fatal error in line ".$errline." of file ".$errfile; - echo ", PHP ".PHP_VERSION." (".PHP_OS.")<br>\n"; - echo "Aborting...<br>\n"; - exit -1; + case E_USER_ERROR: + echo "<b>My ERROR</b> [$errno] $errstr<br />\n"; + echo " Fatal error in line $errline of file $errfile"; + echo ", PHP " . PHP_VERSION . " (" . PHP_OS . ")<br />\n"; + echo "Aborting...<br />\n"; + exit(1); break; - case ERROR: - echo "<b>ERROR</b> [$errno] $errstr<br>\n"; + case E_USER_WARNING: + echo "<b>My WARNING</b> [$errno] $errstr<br />\n"; break; - case WARNING: - echo "<b>WARNING</b> [$errno] $errstr<br>\n"; + case E_USER_NOTICE: + echo "<b>My NOTICE</b> [$errno] $errstr<br />\n"; break; - default: - echo "Unkown error type: [$errno] $errstr<br>\n"; + default: + echo "Unkown error type: [$errno] $errstr<br />\n"; break; } } // ã¨ã©ã¼å¦çã®ãã¹ãç¨é¢æ° -function scale_by_log ($vect, $scale) { - if ( !is_numeric($scale) || $scale <= 0 ) - trigger_error("log(x) for x <= 0 is undefined, you used: scale = $scale", - FATAL); +function scale_by_log($vect, $scale) +{ + if (!is_numeric($scale) || $scale <= 0) { + trigger_error("log(x) for x <= 0 is undefined, you used: scale = $scale", E_USER_ERROR); + } + if (!is_array($vect)) { - trigger_error("Incorrect input vector, array of values expected", ERROR); + trigger_error("Incorrect input vector, array of values expected", E_USER_WARNING); return null; } + for ($i=0; $i<count($vect); $i++) { if (!is_numeric($vect[$i])) - trigger_error("Value at position $i is not a number, using 0 (zero)", - WARNING); - $temp[$i] = log($scale) * $vect[$i]; + trigger_error("Value at position $i is not a number, using 0 (zero)", E_USER_NOTICE); + $temp[$i] = log($scale) * $vect[$i]; + } + return $temp; } - return $temp; -} // å®ç¾©ããã¨ã©ã¼ãã³ãã©ãè¨å®ãã $old_error_handler = set_error_handler("myErrorHandler"); // ã¨ã©ã¼ãçºçãã¾ããã¾ããæ°å¤ã§ãªãé ç®ãæ··ãã£ãé åãå®ç¾©ãã¾ãã echo "vector a\n"; -$a = array(2,3,"foo",5.5,43.3,21.11); +$a = array(2,3, "foo", 5.5, 43.3, 21.11); print_r($a); -// 次ã«è¦åãçºçãããããª2çªç®ã®é åãçæãã¾ãã +// 次ã«è¦åãçºçãããã㪠2 çªç®ã®é åãçæãã¾ãã echo "----\nvector b - a warning (b = log(PI) * a)\n"; $b = scale_by_log($a, M_PI); print_r($b); // é åã®ä»£ããã«æååãæ¸¡ãã¦ãããåé¡ãçºçãã¾ãã -echo "----\nvector c - an error\n"; -$c = scale_by_log("not array",2.3); +echo "----\nvector c - an error\n"; +$c = scale_by_log("not array", 2.3); var_dump($c); -// ã¼ãã¾ãã¯è² æ°ã® log ãå®ç¾©ãããªãã¨ããè´å½çãªã¨ã©ã¼ãçºçãã¾ãã +// ã¼ãã¾ãã¯è² æ°ã®å¯¾æ°ãå®ç¾©ãããªãã¨ããè´å½çãªã¨ã©ã¼ãçºçãã¾ãã echo "----\nvector d - fatal error\n"; $d = scale_by_log($a, -2.5); ?> ]]> </programlisting> - &example.outputs; + &example.outputs.similar; <screen> <![CDATA[ vector a @@ -241,48 +323,24 @@ ---- vector d - fatal error <b>FATAL</b> [256] log(x) for x <= 0 is undefined, you used: scale = -2.5<br /> - Fatal error in line 36 of file trigger_error.php, PHP 4.0.2 (Linux)<br /> +Fatal error in line 36 of file trigger_error.php, PHP 4.0.2 (Linux)<br /> Aborting...<br /> ]]> </screen> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - PHP ã®æ¨æºã®ã¨ã©ã¼ãã³ãã©ã¯å®å ¨ã«ãã¤ãã¹ããããã¨ã«æ³¨æãã¦ä¸ - ããã<function>error_reporting</function> ã®è¨å®ã¯å½±é¿ãããã©ã® - ãããªå ´åã§ãã¦ã¼ã¶ãè¨å®ããã¨ã©ã¼ãã³ãã©ãã³ã¼ã«ããã¾ããã - ã ãããã®å ´åã§ããã³ãã©ã§ <function>error_reporting</function> - ã®ã«ã¬ã³ãã®å¤ãèªã¿ãé©å½ã«åä½ããããã¨ã¯å¯è½ã§ããã¨ã©ã¼ãçº - çããå½ä»¤ã®åã« <link - linkend="language.operators.errorcontrol">@ ã¨ã©ã¼å¶å¾¡æ¼ç®å - </link> ãä»å ããã¦ããå ´åããã®å¤ã¯ 0 ã¨ãªããã¨ã«ã¯æ³¨æãè¦ã - ã¾ãã - </para> - <para> - ã¦ã¼ã¶ãã³ãã©é¢æ°ã¯ãè¦ããã° <function>die</function> ãã³ã¼ã« - ãã責任ããããã¨ã«ã注æãè¦ãã¾ããã¨ã©ã¼ãã³ãã©é¢æ°ããªã¿ã¼ - ã³ããå ´åãã¹ã¯ãªããã®å®è¡ã¯ãã¨ã©ã¼ãçºçããå½ä»¤ã®æ¬¡ã®å½ä»¤ã« - ç¶ç¶ããã¾ãã - </para> - <note> - <para> - (ãã¡ã¤ã«ã¢ãããã¼ãã®ããã«)ã¹ã¯ãªãããå®è¡ãããåã«ã¨ã©ã¼ãçº - çããå ´åãã«ã¹ã¿ã ã¨ã©ã¼ãã³ãã©ã¯ã³ã¼ã«ããã¾ããã - ããã¯ããã®æç¹ã§ã¯ç»é²ããã¦ããªãããã§ãã - </para> - </note> - <note> - <para> - äºçªç®ã®ãã©ã¡ã¼ã¿<parameter>error_types</parameter>㯠- PHP 5ã§è¿½å ããã¾ããã - </para> - </note> - <para> - <function>error_reporting</function>, - <function>restore_error_handler</function>, - <function>trigger_error</function>, ããã³ - <link linkend="errorfunc.constants">ã¨ã©ã¼ã¬ãã«å®æ°</link> - ãåç §ãã ããã + <simplelist> + <member><function>error_reporting</function></member> + <member><function>restore_error_handler</function></member> + <member><function>trigger_error</function></member> + <member><link linkend="errorfunc.constants">ã¨ã©ã¼ã¬ãã«å®æ°</link></member> + <member>&seealso.callback;</member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/restore-error-handler.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/errorfunc/functions/restore-error-handler.xml diff -u phpdoc-ja/reference/errorfunc/functions/restore-error-handler.xml:1.4 phpdoc-ja/reference/errorfunc/functions/restore-error-handler.xml:1.5 --- phpdoc-ja/reference/errorfunc/functions/restore-error-handler.xml:1.4 Sun Jan 2 02:23:31 2005 +++ phpdoc-ja/reference/errorfunc/functions/restore-error-handler.xml Sat Aug 13 19:57:46 2005 @@ -1,32 +1,91 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.5 $ --> <!-- splitted from ./ja/functions/errorfunc.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.1 Maintainer: hirokawa Status: ready --> - <refentry id="function.restore-error-handler"> - <refnamediv> - <refname>restore_error_handler</refname> - <refpurpose> - 以åã®ã¨ã©ã¼ãã³ãã©é¢æ°ãå復ãã - </refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <methodsynopsis> - <type>void</type><methodname>restore_error_handler</methodname> - <void/> - </methodsynopsis> - <para> - <function>set_error_handler</function>ã使ç¨ãã¦ã¨ã©ã¼ãã³ãã©é¢ - æ°ã夿´ããå¾ãå ã®ã¨ã©ã¼ãã³ãã©(çµè¾¼ã¾ãã¯ã¦ã¼ã¶å®ç¾©é¢æ°)ã«æ» - ãããã«ä½¿ç¨ããã¾ãã - </para> +<!-- EN-Revision: 1.12 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> +<refentry id="function.restore-error-handler"> + <refnamediv> + <refname>restore_error_handler</refname> + <refpurpose>以åã®ã¨ã©ã¼ãã³ãã©é¢æ°ãå復ãã</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>restore_error_handler</methodname> + <void/> + </methodsynopsis> + <para> + <function>set_error_handler</function> ã使ç¨ãã¦ã¨ã©ã¼ãã³ãã©é¢æ°ã + 夿´ããå¾ãå ã®ã¨ã©ã¼ãã³ãã©(çµè¾¼ã¾ãã¯ã¦ã¼ã¶å®ç¾©é¢æ°)ã«æ»ãããã« + 使ç¨ããã¾ãã + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + ãã®é¢æ°ã¯å¸¸ã« &true; ãè¿ãã¾ãã + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>restore_error_handler</function> ã®ä¾</title> <para> - <function>error_reporting</function>, - <function>set_error_handler</function>, - <function>trigger_error</function>, - <function>user_error</function>ãåç §ãã ããã + <function>unserialize</function> ãã¨ã©ã¼ãçºçããå ´åã« + å ã®ã¨ã©ã¼ãã³ãã©ã«æ»ããã¨ã«ãã </para> - </refsect1> - </refentry> + <programlisting role="php"> +<![CDATA[ +<?php +function unserialize_handler($errno, $errstr) +{ + echo "Invalid serialized value.\n"; +} + +$serialized = 'foo'; +set_error_handler('unserialize_handler'); +$original = unserialize($serialized); +restore_error_handler(); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Invalid serialized value. +]]> + </screen> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <note> + <para> + <literal>error_handler</literal> 颿°ã®ä¸ãã + <function>restore_error_handler</function> ãã³ã¼ã«ãããå ´åã + ããã¯ç¡è¦ããã¾ãã + </para> + </note> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>error_reporting</function></member> + <member><function>set_error_handler</function></member> + <member><function>restore_exception_handler</function></member> + <member><function>trigger_error</function></member> + </simplelist> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/error-reporting.xml?r1=1.4&r2=1.5&ty=u Index: phpdoc-ja/reference/errorfunc/functions/error-reporting.xml diff -u phpdoc-ja/reference/errorfunc/functions/error-reporting.xml:1.4 phpdoc-ja/reference/errorfunc/functions/error-reporting.xml:1.5 --- phpdoc-ja/reference/errorfunc/functions/error-reporting.xml:1.4 Tue Nov 23 02:40:57 2004 +++ phpdoc-ja/reference/errorfunc/functions/error-reporting.xml Sat Aug 13 19:57:46 2005 @@ -1,36 +1,157 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.4 $ --> -<!-- EN-Revision: 1.11 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.5 $ --> +<!-- EN-Revision: 1.14 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> <refentry id="function.error-reporting"> <refnamediv> <refname>error_reporting</refname> - <refpurpose>åºåããPHPã¨ã©ã¼ã®ç¨®é¡ãè¨å®ãã</refpurpose> + <refpurpose>åºåãã PHP ã¨ã©ã¼ã®ç¨®é¡ãè¨å®ãã</refpurpose> </refnamediv> - <refsect1> + + <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>int</type><methodname>error_reporting</methodname> <methodparam choice="opt"><type>int</type><parameter>level</parameter></methodparam> </methodsynopsis> <para> - <function>error_reporting</function>颿°ã¯ã + <function>error_reporting</function> 颿°ã¯ã <link linkend="ini.error-reporting">error_reporting</link> ãã£ã¬ã¯ãã£ãã - å®è¡æã«è¨å®ãã¾ããPHPã«ã¯å¤ãã®ã¨ã©ã¼ã¬ãã«ãããã + å®è¡æã«è¨å®ãã¾ããPHP ã«ã¯å¤ãã®ã¨ã©ã¼ã¬ãã«ãããã ãã®é¢æ°ã«ããã¹ã¯ãªããã®æç¶æé(å®è¡æé)ã®ã¬ãã«ãè¨å®ããã¾ãã </para> - <para> - <function>error_reporting</function>ã¯ãPHPã®ã¨ã©ã¼åºå - ã¬ãã«ãè¨å®ããå ã®ã¬ãã«ãè¿ãã¾ãã - <parameter>level</parameter> ãã©ã¡ã¼ã¿ã¯ãããããã¹ã¯ - ã¾ããã¯ååä»ãã®å®æ°ã®ã©ã¡ãããã¨ãã¾ãã - å°æ¥ã®ãã¼ã¸ã§ã³ã¨ã®äºææ§ãä¿è¨¼ããããã«ã - ååä»ãã®å®æ°ã®ä½¿ç¨ãå¼·ãæ¨å¥¨ããã¦ãã¾ãã - ã¨ã©ã¼ã¬ãã«ã追å ãããæãæ´æ°ã®ã¬ã³ã¸ã¯å¢å ãã¾ãã - ãã®ããã以åã®æ´æ°ã使ç¨ããã¨ã©ã¼ã¬ãã«ã¯å¸¸ã«æå¾ é - ãã«åä½ããã¨ã¯éãã¾ããã + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>level</parameter></term> + <listitem> + <para> + æ°ãã <link linkend="ini.error-reporting">error_reporting</link> + ã¬ãã«ãããããã¹ã¯ã¾ãã¯ååã¤ã宿°ã®ã©ã¡ããã§ããå°æ¥ã® + ãã¼ã¸ã§ã³ã¨ã®äºææ§ãä¿è¨¼ããããã«ãååã¤ã宿°ã®ä½¿ç¨ã + å¼·ãæ¨å¥¨ããã¦ãã¾ããã¨ã©ã¼ã¬ãã«ã追å ãããã¨ãæ´æ°ã®å¹ ã¯å¢å ãã¾ãã + ãã®ããã以åã®æ´æ°ã使ç¨ããã¨ã©ã¼ã¬ãã«ã¯å¸¸ã«æå¾ éãã«åä½ããã¨ã¯ + éãã¾ããã + </para> + <para> + å©ç¨å¯è½ãªã¨ã©ã¼ã¬ãã«å®æ°ã®ä¸è¦§ã以ä¸ã«ç¤ºãã¾ãã + ãããã®ã¨ã©ã¼ã®å®éã®æå³ã¯ã + <link linkend="errorfunc.constants">å®ç¾©æ¸ã¿ã®å®æ°</link>ã« + è¨è¿°ããã¦ãã¾ãã + <table> + <title><function>error_reporting</function> ã¬ãã«å®æ°ã¨ãããå¤</title> + <tgroup cols="2"> + <thead> + <row> + <entry>å¤</entry> + <entry>宿°</entry> + </row> + </thead> + <tbody> + <row> + <entry>1</entry> + <entry> + <link linkend="e-error">E_ERROR</link> + </entry> + </row> + <row> + <entry>2</entry> + <entry> + <link linkend="e-warning">E_WARNING</link> + </entry> + </row> + <row> + <entry>4</entry> + <entry> + <link linkend="e-parse">E_PARSE</link> + </entry> + </row> + <row> + <entry>8</entry> + <entry> + <link linkend="e-notice">E_NOTICE</link> + </entry> + </row> + <row> + <entry>16</entry> + <entry> + <link linkend="e-core-error">E_CORE_ERROR</link> + </entry> + </row> + <row> + <entry>32</entry> + <entry> + <link linkend="e-core-warning">E_CORE_WARNING</link> + </entry> + </row> + <row> + <entry>64</entry> + <entry> + <link linkend="e-compile-error">E_COMPILE_ERROR</link> + </entry> + </row> + <row> + <entry>128</entry> + <entry> + <link linkend="e-compile-warning">E_COMPILE_WARNING</link> + </entry> + </row> + <row> + <entry>256</entry> + <entry> + <link linkend="e-user-error">E_USER_ERROR</link> + </entry> + </row> + <row> + <entry>512</entry> + <entry> + <link linkend="e-user-warning">E_USER_WARNING</link> + </entry> + </row> + <row> + <entry>1024</entry> + <entry> + <link linkend="e-user-error">E_USER_NOTICE</link> + </entry> + </row> + <row> + <entry>2047</entry> + <entry> + <link linkend="e-all">E_ALL</link> + </entry> + </row> + <row> + <entry>2048</entry> + <entry> + <link linkend="e-strict">E_STRICT</link> + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - <example role="php"> + 夿´åã® <link linkend="ini.error-reporting">error_reporting</link> + ã¬ãã«ãè¿ãã¾ãã + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> <title><function>error_reporting</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ @@ -39,133 +160,53 @@ // å ¨ã¦ã®ã¨ã©ã¼åºåããªãã«ãã error_reporting(0); -// Report simple running errors +// åç´ãªå®è¡æã¨ã©ã¼ã表示ãã error_reporting(E_ERROR | E_WARNING | E_PARSE); -// Reporting E_NOTICE can be good too (to report uninitialized -// variables or catch variable name misspellings ...) +// E_NOTICE ã表示ãããã®ãããããï¼åæåããã¦ããªã +// 夿°ã夿°åã®ã¹ãã«ãã¹ãªã©â¦ï¼ error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); -// Report all errors except E_NOTICE -// This is the default value set in php.ini +// E_NOTICE 以å¤ã®å ¨ã¦ã®ã¨ã©ã¼ã表示ãã +// ãã㯠php.ini ã§è¨å®ããã¦ããããã©ã«ãå¤ error_reporting(E_ALL ^ E_NOTICE); -// Report all PHP errors (bitwise 63 may be used in PHP 3) +// å ¨ã¦ã® PHP ã¨ã©ã¼ã表示ããï¼ããã 63 㯠PHP 3 ã§å©ç¨ãããï¼ error_reporting(E_ALL); -// Same as error_reporting(E_ALL); +// error_reporting(E_ALL); ã¨åã ini_set('error_reporting', E_ALL); + +?> ]]> </programlisting> </example> </para> - <para> - å©ç¨å¯è½ãªã¨ã©ã¼ã¬ãã«å®æ°ã®ä¸è¦§ã以ä¸ã«ç¤ºãã¾ãã - ãããã®ã¨ã©ã¼ã®å®éã®æå³ã¯ã - <link linkend="errorfunc.constants">å®ç¾©æ¸ã¿ã®å®æ°</link>.ã« - è¨è¿°ããã¦ãã¾ãã - <table> - <title><function>error_reporting</function>ã¬ãã«å®æ°ã¨ãããå¤</title> - <tgroup cols="2"> - <thead> - <row> - <entry>å¤</entry> - <entry>宿°</entry> - </row> - </thead> - <tbody> - <row> - <entry>1</entry> - <entry> - <link linkend="e-error">E_ERROR</link> - </entry> - </row> - <row> - <entry>2</entry> - <entry> - <link linkend="e-warning">E_WARNING</link> - </entry> - </row> - <row> - <entry>4</entry> - <entry> - <link linkend="e-parse">E_PARSE</link> - </entry> - </row> - <row> - <entry>8</entry> - <entry> - <link linkend="e-notice">E_NOTICE</link> - </entry> - </row> - <row> - <entry>16</entry> - <entry> - <link linkend="e-core-error">E_CORE_ERROR</link> - </entry> - </row> - <row> - <entry>32</entry> - <entry> - <link linkend="e-core-warning">E_CORE_WARNING</link> - </entry> - </row> - <row> - <entry>64</entry> - <entry> - <link linkend="e-compile-error">E_COMPILE_ERROR</link> - </entry> - </row> - <row> - <entry>128</entry> - <entry> - <link linkend="e-compile-warning">E_COMPILE_WARNING</link> - </entry> - </row> - <row> - <entry>256</entry> - <entry> - <link linkend="e-user-error">E_USER_ERROR</link> - </entry> - </row> - <row> - <entry>512</entry> - <entry> - <link linkend="e-user-warning">E_USER_WARNING</link> - </entry> - </row> - <row> - <entry>1024</entry> - <entry> - <link linkend="e-user-error">E_USER_NOTICE</link> - </entry> - </row> - <row> - <entry>2047</entry> - <entry> - <link linkend="e-all">E_ALL</link> - </entry> - </row> - <row> - <entry>2048</entry> - <entry> - <link linkend="e-strict">E_STRICT</link> - </entry> - </row> - </tbody> - </tgroup> - </table> - </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; <warning> <simpara> - PHP > 5.0.0以éãå¤2048ãæãã<constant>E_STRICT</constant>ãå©ç¨å¯è½ã§ãã - <constant>E_ALL</constant> ã«ã¯ãã¨ã©ã¼ã¬ãã« - <constant>E_STRICT</constant>ã¯å«ã¾ãã¾ããã + PHP > 5.0.0 ã§ã¯ãå¤ 2048 ãæãã <constant>E_STRICT</constant> + ãå©ç¨å¯è½ã§ãã<constant>E_ALL</constant> ã«ã¯ãã¨ã©ã¼ã¬ãã« + <constant>E_STRICT</constant> ã¯å«ã¾ã<emphasis>ã¾ãã</emphasis>ã + ã»ã¨ãã©ã® <constant>E_STRICT</constant> ã¬ãã«ã®ã¨ã©ã¼ã¯ã¹ã¯ãªããã® + ã³ã³ãã¤ã«æã«çºçãã¾ãããã®ããã + <link linkend="ini.error-reporting">error_reporting</link> ã§ + <constant>E_STRICT</constant> ãå«ãããã«è¨å®ããã¦ããç°å¢ã§ã¯ + ãããã®ã¨ã©ã¼ãæ¤åºã§ãã¾ããã </simpara> </warning> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - <link linkend="ini.display-errors">display_errors</link> - <function>ini_set</function>. + <simplelist> + <member><link linkend="ini.display-errors">display_errors</link> ãã£ã¬ã¯ãã£ã</member> + <member><function>ini_set</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/error-log.xml?r1=1.3&r2=1.4&ty=u Index: phpdoc-ja/reference/errorfunc/functions/error-log.xml diff -u phpdoc-ja/reference/errorfunc/functions/error-log.xml:1.3 phpdoc-ja/reference/errorfunc/functions/error-log.xml:1.4 --- phpdoc-ja/reference/errorfunc/functions/error-log.xml:1.3 Mon Nov 22 23:45:32 2004 +++ phpdoc-ja/reference/errorfunc/functions/error-log.xml Sat Aug 13 19:57:46 2005 @@ -1,111 +1,155 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.4 $ --> <!-- splitted from ./ja/functions/errorfunc.xml, last change in rev 1.1 --> -<!-- EN-Revision: 1.1 Maintainer: hirokawa Status: ready --> - <refentry id="function.error-log"> - <refnamediv> - <refname>error_log</refname> - <refpurpose>ã¨ã©ã¼ã¡ãã»ã¼ã¸ãéä¿¡ãã</refpurpose> - </refnamediv> - <refsect1> - <title>説æ</title> - <methodsynopsis> - <type>int</type><methodname>error_log</methodname> - <methodparam><type>string</type><parameter>message</parameter></methodparam> - <methodparam><type>int</type><parameter>message_type</parameter></methodparam> - <methodparam><type>string</type><parameter> - <replaceable><optional>destination</optional></replaceable> - </parameter></methodparam> - <methodparam><type>string</type><parameter> - <replaceable><optional>extra_headers</optional></replaceable> - </parameter></methodparam> - </methodsynopsis> - <para> - ã¨ã©ã¼ã¡ãã»ã¼ã¸ã Web ãµã¼ãã®ã¨ã©ã¼ãã°ã - <acronym>TCP</acronym>ãã¼ãããã¡ã¤ã«ã®ããããã«éãã¾ãã - æåã®ãã©ã¡ã¼ã¿ <parameter>message</parameter> ã¯ãã°ããã - ã¡ãã»ã¼ã¸ã§ãã2 çªç®ã®ãã©ã¡ã¼ã¿ <parameter>message_type - </parameter> ã¯ã¡ãã»ã¼ã¸ãã©ãã¸éãã®ããæå®ãã¾ãã - <table> - <title><function>error_log</function> ãã°ã¿ã¤ã</title> - <tgroup cols="2"> - <tbody> - <row> - <entry>0</entry> - <entry> - <parameter>message</parameter> ã¯ããªãã¬ã¼ãã£ã³ã°ã»ã·ã¹ãã - ã®ã·ã¹ãã ãã°ã®ã¡ã«ããºã ã¾ãã¯ãã¡ã¤ã«ã®ããããã使ã£ã¦ - PHP ã®ã·ã¹ãã ã»ãã¬ã¼ã«éããã¾ããã©ã¡ãã使ããããã¯ã - <link linkend="ini.error-log">error_log</link> ã®è¨å® - ãã£ã¬ã¯ãã£ãã«ããæ±ºå®ããã¾ãã - </entry> - </row> - <row> - <entry>1</entry> - <entry> - <parameter>message</parameter> ã¯ã<parameter>destination - </parameter> ãã©ã¡ã¼ã¿ã§æå®ãããã¢ãã¬ã¹ã«ãé»åã¡ã¼ã« - ã«ããéããã¾ãããã®ã¡ãã»ã¼ã¸ã¿ã¤ãã®å ´åã«ã®ã¿ã - 4 çªç®ã®ãã©ã¡ã¼ã¿ã§ãã <parameter>extra_headers</parameter> - ã使ããã¾ãããã®ã¡ãã»ã¼ã¸ã¿ã¤ãã¯ã<function>mail</function> - ã¨åæ§ã«ãåãååã®å é¨é¢æ°ã使ç¨ãã¾ãã - </entry> - </row> - <row> - <entry>2</entry> - <entry> - <parameter>message</parameter> ã¯ãPHP ã®ãããã°ç¨ã³ãã¯ã·ã§ã³ - ãéãã¦éããã¾ãããã®ãªãã·ã§ã³ã¯ã - <link linkend="install.configure.enable-debugger">ãªã¢ã¼ãã - ããã°ãæå¹ã«ãªã£ã¦ãã</link>å ´åã®ã¿ä½¿ç¨ã§ãã¾ãããã®ã±ã¼ - ã¹ã§ã¯ã<parameter>destination</parameter> ãã©ã¡ã¼ã¿ã«ããã - ãããã°æ å ±ãåãåãã½ã±ããã®ãã¹ãåã¾ã㯠IP ã¢ãã¬ã¹ã - ããã³ãªãã·ã§ã³ã§ãã¼ãçªå·ãæå®ãã¾ãã - </entry> - </row> - <row> - <entry>3</entry> - <entry> - <parameter>message</parameter> 㯠<parameter>destination - </parameter> ã§æå®ããããã¡ã¤ã«ã«è¿½å ããã¾ãã - </entry> - </row> - </tbody> - </tgroup> - </table> - </para> - <warning> - <para> - TCP/IPçµç±ã§ã®ãªã¢ã¼ããããã°ã¯ãPHP 3ã®æ©è½ã§ãããPHP 4ã§ã¯å© - ç¨ã§ãã¾ããã - </para> - </warning> - <para> - <example role="php"> - <title><function>error_log</function> ã®ä¾</title> - <programlisting role="php"> +<!-- EN-Revision: 1.13 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> +<refentry id="function.error-log"> + <refnamediv> + <refname>error_log</refname> + <refpurpose>ã¨ã©ã¼ã¡ãã»ã¼ã¸ãéä¿¡ãã</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>error_log</methodname> + <methodparam><type>string</type><parameter>message</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>message_type</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>destination</parameter></methodparam> + <methodparam choice="opt"><type>string</type><parameter>extra_headers</parameter></methodparam> + </methodsynopsis> + <para> + ã¨ã©ã¼ã¡ãã»ã¼ã¸ã Web ãµã¼ãã®ã¨ã©ã¼ãã°ã + <acronym>TCP</acronym> ãã¼ãããããã¯ãã¡ã¤ã«ã«éãã¾ãã + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>message</parameter></term> + <listitem> + <para> + ãã°ã«è¨é²ãããã¨ã©ã¼ã¡ãã»ã¼ã¸ã + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>message_type</parameter></term> + <listitem> + <para> + ã¡ãã»ã¼ã¸ãã©ãã«éãã®ããæå®ãã¾ãã以ä¸ã®ä¸ããæå®ã§ãã¾ãã + </para> + <para> + <table> + <title><function>error_log</function> ãã°ã¿ã¤ã</title> + <tgroup cols="2"> + <tbody> + <row> + <entry>0</entry> + <entry> + <parameter>message</parameter> ã¯ããªãã¬ã¼ãã£ã³ã°ã»ã·ã¹ãã + ã®ã·ã¹ãã ãã°ã®ã¡ã«ããºã ã¾ãã¯ãã¡ã¤ã«ã®ããããã使ã£ã¦ + PHP ã®ã·ã¹ãã ã»ãã¬ã¼ã«éããã¾ããã©ã¡ãã使ããããã¯ã + è¨å®ãã£ã¬ã¯ãã£ã <link linkend="ini.error-log">error_log</link> + ã®å 容ã«ããæ±ºå®ããã¾ããããã¯ããã©ã«ãã®ãªãã·ã§ã³ã§ãã + </entry> + </row> + <row> + <entry>1</entry> + <entry> + <parameter>message</parameter> ã¯ã<parameter>destination + </parameter> ãã©ã¡ã¼ã¿ã§æå®ãããã¢ãã¬ã¹ã«ãé»åã¡ã¼ã« + ã«ããéããã¾ãããã®ã¡ãã»ã¼ã¸ã¿ã¤ãã®å ´åã«ã®ã¿ã + 4 çªç®ã®ãã©ã¡ã¼ã¿ã§ãã <parameter>extra_headers</parameter> + ã使ããã¾ãã + </entry> + </row> + <row> + <entry>2</entry> + <entry> + <parameter>message</parameter> ã¯ãPHP ã®ãããã°ç¨æ¥ç¶ã + éãã¦éããã¾ãããã®ãªãã·ã§ã³ã¯ã + <link linkend="install.configure.enable-debugger"> + ãªã¢ã¼ããããã°ãæå¹ã«ãªã£ã¦ãã</link>å ´åã®ã¿ä½¿ç¨ã§ãã¾ãã + ãã®ã±ã¼ã¹ã§ã¯ã<parameter>destination</parameter> ãã©ã¡ã¼ã¿ã«ããã + ãããã°æ å ±ãåãåãã½ã±ããã®ãã¹ãåã¾ã㯠IP ã¢ãã¬ã¹ã + ããã³ãªãã·ã§ã³ã§ãã¼ãçªå·ãæå®ãã¾ãããã®ãªãã·ã§ã³ã¯ PHP 3 + ã§ã®ã¿æå¹ã§ãã + </entry> + </row> + <row> + <entry>3</entry> + <entry> + <parameter>message</parameter> 㯠<parameter>destination + </parameter> ã§æå®ããããã¡ã¤ã«ã«è¿½å ããã¾ãã + æç¤ºçã«æå®ããªãéãã<parameter>message</parameter> ã® + æå¾ã«ã¯æ¹è¡æåã¯è¿½å ããã¾ããã + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>destination</parameter></term> + <listitem> + <para> + ã¡ãã»ã¼ã¸ã®éä¿¡å ããã®è¨å®ã¯ãä¸ã§èª¬æãã¦ãã + <parameter>message</parameter> ãã©ã¡ã¼ã¿ã®å¤ã«ããã¾ãã + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>extra_headers</parameter></term> + <listitem> + <para> + 追å ã®ãããã<parameter>message</parameter> ãã©ã¡ã¼ã¿ã + <literal>1</literal> ã«è¨å®ãããå ´åã«å©ç¨ããã¾ãã + ãã®ã¡ãã»ã¼ã¸ã¿ã¤ãã¯ã<function>mail</function> ã¨åæ§ã« + å é¨é¢æ°ãå©ç¨ãã¾ãã + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example role="php"> + <title><function>error_log</function> ã®ä¾</title> + <programlisting role="php"> <![CDATA[ +<?php // ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ã§ããªãå ´åã // ãµã¼ããã°ãéãã¦ã¨ã©ã¼ãéç¥ããã -if (!Ora_Logon ($username, $password)) { - error_log ("ãªã©ã¯ã«ã®ãã¼ã¿ãã¼ã¹ã使ç¨ã§ãã¾ãã!", 0); +if (!Ora_Logon($username, $password)) { + error_log("ãªã©ã¯ã«ã®ãã¼ã¿ãã¼ã¹ã使ç¨ã§ãã¾ãã!", 0); } -// Foo ã«å¤±æãããã管çè ã« email ã§éç¥ãã -if (!($foo = allocate_new_foo()) { - error_log("大å¤ã§ãï¼ FOO ã«å¤±æãã¾ãã!", 1, - "operator@mydomain.com"); +// FOO ã«å¤±æãããã管çè ã« email ã§éç¥ãã +if (!($foo = allocate_new_foo())) { + error_log("大å¤ã§ããFOO ã«å¤±æãã¾ãã!", 1, + "operator@example.com"); } // ãã以å¤ã® error_log() ã®ã³ã¼ã«æ¹æ³ï¼ -error_log ("大å¤ã !", 2, "127.0.0.1:7000"); -error_log ("大å¤ã !", 2, "loghost"); -error_log ("大å¤ã !", 3, "/var/tmp/my-errors.log"); +error_log("大å¤ã !", 2, "127.0.0.1:7000"); +error_log("大å¤ã !", 2, "loghost"); +error_log("大å¤ã !", 3, "/var/tmp/my-errors.log"); +?> ]]> - </programlisting> - </example> - </para> - </refsect1> - </refentry> + </programlisting> + </example> + </para> + </refsect1> +</refentry> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/functions/debug-backtrace.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc-ja/reference/errorfunc/functions/debug-backtrace.xml diff -u phpdoc-ja/reference/errorfunc/functions/debug-backtrace.xml:1.2 phpdoc-ja/reference/errorfunc/functions/debug-backtrace.xml:1.3 --- phpdoc-ja/reference/errorfunc/functions/debug-backtrace.xml:1.2 Sun Jan 2 02:23:31 2005 +++ phpdoc-ja/reference/errorfunc/functions/debug-backtrace.xml Sat Aug 13 19:57:46 2005 @@ -1,27 +1,34 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> +<!-- EN-Revision: 1.15 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> <refentry id="function.debug-backtrace"> <refnamediv> <refname>debug_backtrace</refname> - <refpurpose> - ããã¯ãã¬ã¼ã¹ãçæãã - </refpurpose> + <refpurpose>ããã¯ãã¬ã¼ã¹ãçæãã</refpurpose> </refnamediv> - <refsect1> - <title>説æ</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>array</type><methodname>debug_backtrace</methodname> <void/> </methodsynopsis> <para> - <function>debug_backtrace</function>ã¯ãPHPããã¯ãã¬ã¼ã¹ãçæãã - ãã®æ å ±ã飿³é åã¨ãã¦è¿ãã¾ããè¿ãããå¯è½æ§ãããè¦ç´ ã以ä¸ã® - 表ã«ç¤ºãã¾ãã + <function>debug_backtrace</function> 㯠PHP ããã¯ãã¬ã¼ã¹ãçæãã¾ãã + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 飿³é åãè¿ãã¾ãã飿³é åã®è¦ç´ ã¨ãã¦è¿ãããå¯è½æ§ããããã®ã¯ + 以ä¸ã®ã¨ããã§ãã </para> <para> <table> <title> - <function>debug_backtrace</function>ããè¿ãããå¯è½æ§ãããè¦ç´ + <function>debug_backtrace</function> ããè¿ãããå¯è½æ§ãããè¦ç´ </title> <tgroup cols="3"> <thead> @@ -73,7 +80,9 @@ <entry>type</entry> <entry><type>string</type></entry> <entry> - ã«ã¬ã³ãã®ã¯ã©ã¹åã + ã«ã¬ã³ãã®ã³ã¼ã«æ¹å¼ãã¡ã½ããå¼ã³åºãã®å ´å㯠"->"ãéçãªã¡ã½ãã + å¼ã³åºãã®å ´å㯠"::" ãè¿ããã¾ãã颿°å¼ã³åºãã®å ´å㯠+ ä½ãè¿ããã¾ããã </entry> </row> <row> @@ -89,40 +98,43 @@ </tgroup> </table> </para> - <para> - 以ä¸ã«ç°¡åãªä¾ã示ãã¾ãã - </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; <para> <example> - <title> - <function>debug_backtrace</function>ã®ä¾ - </title> + <title><function>debug_backtrace</function> ã®ä¾</title> <programlisting role="php"> <![CDATA[ -// ãã¡ã¤ã«å: a.php <?php +// ãã¡ã¤ã«å: a.php -function a_test($str) { - - print "\nHi: $str"; - +function a_test($str) +{ + echo "\nHi: $str"; var_dump(debug_backtrace()); } a_test('friend'); ?> -// ãã¡ã¤ã«å: b.php <?php +// ãã¡ã¤ã«å: b.php include_once '/tmp/a.php'; ?> - -/* /tmp/b.php ãå®è¡ããéã®çµæ - +]]> + </programlisting> + <para> + <filename>/tmp/b.php</filename> ãå®è¡ããéã®çµæã¯ + 以ä¸ã®ããã«ãªãã¾ãã + </para> + <screen> +<![CDATA[ Hi: friend array(2) { - [0]=> - array(4) { +[0]=> +array(4) { ["file"] => string(10) "/tmp/a.php" ["line"] => int(10) ["function"] => string(6) "a_test" @@ -130,25 +142,31 @@ array(1) { [0] => &string(6) "friend" } - } - [1]=> - array(4) { +} +[1]=> +array(4) { ["file"] => string(10) "/tmp/b.php" ["line"] => int(2) - ["args"] => + ["args"] => array(1) { [0] => string(10) "/tmp/a.php" } ["function"] => string(12) "include_once" } } -*/ ]]> - </programlisting> + </screen> </example> </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - <function>trigger_error</function>ãåç §ãã¦ãã ããã + <simplelist> + <member><function>trigger_error</function></member> + <member><function>debug_print_backtrace</function></member> + </simplelist> </para> </refsect1> </refentry> http://cvs.php.net/diff.php/phpdoc-ja/reference/errorfunc/ini.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-ja/reference/errorfunc/ini.xml diff -u phpdoc-ja/reference/errorfunc/ini.xml:1.5 phpdoc-ja/reference/errorfunc/ini.xml:1.6 --- phpdoc-ja/reference/errorfunc/ini.xml:1.5 Sun Jan 2 02:23:31 2005 +++ phpdoc-ja/reference/errorfunc/ini.xml Sat Aug 13 19:57:46 2005 @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.5 $ --> -<!-- EN-Revision: 1.20 Maintainer: hirokawa Status: ready --> +<!-- $Revision: 1.6 $ --> +<!-- EN-Revision: 1.28 Maintainer: hirokawa Status: ready --> +<!-- CREDITS: takagi --> <section id="errorfunc.configuration"> &reftitle.runtime; &extension.runtime; @@ -13,94 +14,110 @@ <entry>åå</entry> <entry>ããã©ã«ã</entry> <entry>夿´ã®å¯å¦</entry> + <entry>夿´å±¥æ´</entry> </row> </thead> <tbody> <row> <entry>error_reporting</entry> - <entry>E_ALL & ~E_NOTICE</entry> + <entry>NULL</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>display_errors</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>display_startup_errors</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.0.3 以éã§æå¹ã§ãã</entry> </row> <row> <entry>log_errors</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>log_errors_max_len</entry> <entry>"1024"</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.3.0 以éã§æå¹ã§ãã</entry> </row> <row> <entry>ignore_repeated_errors</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.3.0 以éã§æå¹ã§ãã</entry> </row> <row> <entry>ignore_repeated_source</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.3.0 以éã§æå¹ã§ãã</entry> </row> <row> <entry>report_memleaks</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.3.0 以éã§æå¹ã§ãã</entry> </row> <row> <entry>track_errors</entry> <entry>"0"</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>html_errors</entry> <entry>"1"</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP <= 4.2.3 ã§ã¯ PHP_INI_SYSTEM ãPHP 4.0.2 以éã§æå¹ã§ãã</entry> </row> <row> <entry>docref_root</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.3.0 以éã§æå¹ã§ãã</entry> </row> <row> <entry>docref_ext</entry> <entry>""</entry> <entry>PHP_INI_ALL</entry> + <entry>PHP 4.3.2 以éã§æå¹ã§ãã</entry> </row> <row> <entry>error_prepend_string</entry> <entry>NULL</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>error_append_string</entry> <entry>NULL</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>error_log</entry> <entry>NULL</entry> <entry>PHP_INI_ALL</entry> + <entry></entry> </row> <row> <entry>warn_plus_overloading</entry> <entry>NULL</entry> <entry>PHP_INI??</entry> + <entry></entry> </row> </tbody> </tgroup> </table> - PHP_INI_* 宿°ã®è©³ç´°ããã³å®ç¾©ã«ã¤ãã¦ã¯ã - <function>ini_set</function>ãåç §ãã¦ãã ããã + &ini.php.constants; </para> <para> 以ä¸ã«è¨å®ãã£ã¬ã¯ãã£ãã®ç°¡åãªèª¬æã示ãã¾ãã @@ -174,6 +191,14 @@ 使ç¨ãã¹ãã§ã¯ããã¾ãããï¼ä¾ãã°ã¤ã³ã¿ã¼ãããã«æ¥ç¶ãããã·ã¹ãã ãªã©ï¼ </para> </note> + <note> + <para> + display_errors ã¯å®è¡æã«ãè¨å®å¯è½ï¼<function>ini_set</function> + 颿°ãç¨ãã¦ï¼ã§ãããã¹ã¯ãªãããè´å½çï¼fatalï¼ãªã¨ã©ã¼ãçºçããå ´å㯠+ ãã®è¨å®ã¯åæ ããã¾ããããªããªããè¦æ±ãããã¢ã¯ã·ã§ã³ã¯ + å®è¡ãããªãã£ãããã§ãã + </para> + </note> </listitem> </varlistentry> @@ -220,10 +245,10 @@ <para> log_errorsã®æå¤§é·ããããã¤ãåä½ã§è¨å®ãã¾ãã <link linkend="ini.error-log">error_log</link> ã«ã¯ã - ãã®è¨å®ã§æ å ±ã追å ããã¾ããããã©ã«ãã¯1024ã§ã0ãæå®ãã㨠+ ãã®è¨å®ã§æ å ±ã追å ããã¾ããããã©ã«ã㯠1024 ã§ã0 ãæå®ãã㨠æå¤§é·ã®å¶éã¯å ¨ãé©ç¨ãããªããªãã¾ãã ãã®é·ãã¯ã¨ã©ã¼ãã°ã«è¨é²ããã - ã¨ã©ã¼è¡¨ç¤ºã¨<link + ã¨ã©ã¼è¡¨ç¤ºã¨ <link linkend="reserved.variables.phperrormsg">$php_errormsg</link> ã«é©ç¨ããã¾ãã </para> @@ -385,11 +410,11 @@ <para> ã¹ã¯ãªããã¨ã©ã¼ãè¨é²ããããã¡ã¤ã«åã§ãã ãã¡ã¤ã«ã¯ã¦ã§ããµã¼ãã¦ã¼ã¶ã§æ¸ãè¾¼ããªããã°ãªãã¾ããã - <literal>syslog</literal>ãæå®ãããã¨ãã¨ã©ã¼ã¯ãã¡ã¤ã«ã§ã¯ãªã - ã·ã¹ãã ãã¬ã¼ã«éããã¾ããããã¯UNIXã§ã¯syslog(3)ã§ãã - Windows NTã§ã¯ã¤ãã³ããã°ã®ãã¨ã§ããã·ã¹ãã ãã¬ã¼ã¯ - Windows95ã§ã¯ãµãã¼ãããã¦ãã¾ããã - <function>syslog</function>ãåç §ãã¦ãã ããã + <literal>syslog</literal> ãæå®ãããã¨ãã¨ã©ã¼ã¯ãã¡ã¤ã«ã§ã¯ãªã + ã·ã¹ãã ãã¬ã¼ã«éããã¾ãããã㯠UNIX ã§ã¯ syslog(3) ã§ãã + Windows NT ã§ã¯ã¤ãã³ããã°ã®ãã¨ã§ããã·ã¹ãã ãã¬ã¼ã¯ + Windows 95 ã§ã¯ãµãã¼ãããã¦ãã¾ããã + <function>syslog</function> ãåç §ãã¦ãã ããã </para> </listitem> </varlistentry>