cvs: phpdoc /en/reference/misc/functions exit.xml

From: Date: Tue, 27 Apr 2004 13:40:36 +0000
Subject: cvs: phpdoc /en/reference/misc/functions exit.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969360283@lists.php.net to get a copy of this message
nlopess Tue Apr 27 09:40:36 2004 EDT Modified files: /phpdoc/en/reference/misc/functions exit.xml Log: fix #28180: better explanation and statuses examples http://cvs.php.net/diff.php/phpdoc/en/reference/misc/functions/exit.xml?r1=1.7&r2=1.8&ty=u Index: phpdoc/en/reference/misc/functions/exit.xml diff -u phpdoc/en/reference/misc/functions/exit.xml:1.7 phpdoc/en/reference/misc/functions/exit.xml:1.8 --- phpdoc/en/reference/misc/functions/exit.xml:1.7 Fri Mar 5 21:40:22 2004 +++ phpdoc/en/reference/misc/functions/exit.xml Tue Apr 27 09:40:36 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7 $ --> +<!-- $Revision: 1.8 $ --> <!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 --> <refentry id="function.exit"> <refnamediv> @@ -34,8 +34,8 @@ <simpara> If <parameter>status</parameter> is an <type>integer</type>, that value will also be used as the exit status. Exit statuses should be in the - range 1 to 254, the exit status 255 is reserved by PHP and shall not be - used. + range 0 to 254, the exit status 255 is reserved by PHP and shall not be + used. The status 0 is used to terminate the program sucefully. </simpara> <para> <example> @@ -51,7 +51,27 @@ ?> ]]> </programlisting> - <!-- TODO: example with integer exit-statis --> + </example> + </para> + <para> + <example> + <title><function>exit</function> status example</title> + <programlisting role="php"> +<![CDATA[ +<?php + +//exit program normally +exit; +exit(); +exit(0); + +//exit with an error code +exit(1); +exit(0376); //octal + +?> +]]> + </programlisting> </example> </para> <note>

« previous php.doc (#969360283) next »