jimw            Fri Sep 28 16:18:01 2001 EDT

  Modified files:              
    /phpdoc/en/appendices       aliases.xml 
    /phpdoc/en/functions        misc.xml 
  Log:
  die is just an alias for exit, so document it that way.
  
Index: phpdoc/en/appendices/aliases.xml
diff -u phpdoc/en/appendices/aliases.xml:1.11 phpdoc/en/appendices/aliases.xml:1.12
--- phpdoc/en/appendices/aliases.xml:1.11       Fri Sep 21 22:23:44 2001
+++ phpdoc/en/appendices/aliases.xml    Fri Sep 28 16:17:59 2001
@@ -1,5 +1,5 @@
 <?xml encoding="iso-8859-1"?>
-<!-- $Revision: 1.11 $ -->
+<!-- $Revision: 1.12 $ -->
 <appendix id="aliases">
  <title>Aliases list</title>
  <para>
@@ -197,6 +197,11 @@
  <entry>cv_void</entry>
  <entry><function>ccvs_void</function></entry>
  <entry><link linkend="ref.ccvs">CCVS</link></entry>
+</row>
+<row>
+ <entry>die</entry>
+ <entry><function>exit</function></entry>
+ <entry><link linkend="ref.misc">Miscellaneous functions</link></entry>
 </row>
 <row>
  <entry>dir</entry>
Index: phpdoc/en/functions/misc.xml
diff -u phpdoc/en/functions/misc.xml:1.55 phpdoc/en/functions/misc.xml:1.56
--- phpdoc/en/functions/misc.xml:1.55   Fri Sep 21 19:21:07 2001
+++ phpdoc/en/functions/misc.xml        Fri Sep 28 16:18:00 2001
@@ -1,5 +1,5 @@
 <?xml encoding="iso-8859-1"?>
-<!-- $Revision: 1.55 $ -->
+<!-- $Revision: 1.56 $ -->
  <reference id="ref.misc">
   <title>Miscellaneous functions</title>
   <titleabbrev>Misc.</titleabbrev>
@@ -239,72 +239,6 @@
    </refsect1>
   </refentry>
 
-  <refentry id="function.die">
-   <refnamediv>
-    <refname>die</refname>
-    <refpurpose>
-     Output a message and terminate the current script
-    </refpurpose>
-   </refnamediv>
-   <refsect1>
-    <title>Description</title>
-    <funcsynopsis>
-     <funcprototype>
-      <funcdef>void <function>die</function></funcdef>
-      <paramdef>string <parameter>message</parameter></paramdef>
-     </funcprototype>
-    </funcsynopsis>
-    <simpara>
-     <function>die</function> outputs <parameter>message</parameter>
-     and terminates parsing of the script.  It does not return
-     anything.
-    </simpara>
-    <simpara>
-     Alternatively, <function>die</function> will also accept a
-     function as a parameter. That function will be executed
-     before <function>die</function> terminates parsing of the script.
-    </simpara>
-    <para>
-     <example>
-      <title><function>die</function> example</title>
-      <programlisting role="php">
-&lt;?php
-
-$filename = '/path/to/data-file';
-$file = fopen ($filename, 'r')
-    or die("unable to open file ($filename)");
-
-?&gt;
-      </programlisting>
-     </example>
-    </para>
-    <para>
-     <example>
-      <title><function>die</function> example using a function</title>
-      <programlisting role="php">
-&lt;?php
-
-function handle_error($msg) {
-    if ($fp = @fopen("/tmp/error.log", "a")) {
-        fwrite($fp, $msg, strlen($msg));
-        fclose($fp);
-    }
-}
-
-if ($bad) {
-    die(handle_error("Something bad happened.\n"));
-}
-
-?&gt;
-      </programlisting>
-     </example>
-    </para>
-    <simpara>
-     See also <function>exit</function>.
-    </simpara>
-   </refsect1>
-  </refentry>
-
   <refentry id="function.eval">
    <refnamediv>
     <refname>eval</refname>
@@ -375,24 +309,39 @@
   <refentry id="function.exit">
    <refnamediv>
     <refname>exit</refname>
-    <refpurpose>Terminate current script</refpurpose>
+    <refpurpose>Output a message and terminate the current script</refpurpose>
    </refnamediv>
    <refsect1>
     <title>Description</title>
     <funcsynopsis>
      <funcprototype>
       <funcdef>void <function>exit</function></funcdef>
-     <paramdef>mixed <parameter>status</parameter></paramdef>
+      <paramdef>mixed <parameter><optional>status</optional></parameter></paramdef>
      </funcprototype>
     </funcsynopsis>
     <simpara>
      The <function>exit</function> function terminates execution of
      the script. It has no return value, but will use
-     <parameter>status</parameter> as its exit status.
+     <parameter>status</parameter> as its exit status, as well as
+     printing it.
     </simpara>
     <simpara>
-     See also <function>die</function>.
+     Also aliased as <function>die</function>.
     </simpara>
+    <para>
+     <example>
+      <title><function>exit</function> example</title>
+      <programlisting role="php">
+&lt;?php
+
+$filename = '/path/to/data-file';
+$file = fopen ($filename, 'r')
+    or exit("unable to open file ($filename)");
+
+?&gt;
+      </programlisting>
+     </example>
+    </para>
    </refsect1>
   </refentry> 
 


Reply via email to