mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
fix #28180: better explanation and statuses examples
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@157266 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
7e6176231a
commit
6fbc6ad8bf
1 changed files with 24 additions and 4 deletions
|
@ -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 @@ $file = fopen($filename, 'r')
|
|||
?>
|
||||
]]>
|
||||
</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>
|
||||
|
|
Loading…
Reference in a new issue