Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 2384

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>return</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Control Structures"
HREF="control-structures.html"><LINK
REL="PREVIOUS"
TITLE="declare"
HREF="control-structures.declare.html"><LINK
REL="NEXT"
TITLE="require"
HREF="function.require.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="control-structures.declare.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 12. Control Structures</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.require.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="function.return"
></A
>return</H1
><P
>&#13;    If called from within a function, the <A
HREF="function.return.html"
><B
CLASS="function"
>return()</B
></A
>
    statement immediately ends execution of the current function, and
    returns its argument as the value of the function
    call. <A
HREF="function.return.html"
><B
CLASS="function"
>return()</B
></A
> will also end the execution of
    an <A
HREF="function.eval.html"
><B
CLASS="function"
>eval()</B
></A
> statement or script file.
   </P
><P
>&#13;    If called from the global scope, then execution of the current
    script file is ended. If the current script file was
    <A
HREF="function.include.html"
><B
CLASS="function"
>include()</B
></A
>ed or <A
HREF="function.require.html"
><B
CLASS="function"
>require()</B
></A
>ed,
    then control is passed back to the calling file. Furthermore, if
    the current script file was <A
HREF="function.include.html"
><B
CLASS="function"
>include()</B
></A
>ed, then
    the value given to <A
HREF="function.return.html"
><B
CLASS="function"
>return()</B
></A
> will be returned as
    the value of the <A
HREF="function.include.html"
><B
CLASS="function"
>include()</B
></A
> call. If
    <A
HREF="function.return.html"
><B
CLASS="function"
>return()</B
></A
> is called from within the main script
    file, then script execution ends. If the current script file was
    named by the <A
HREF="configuration.directives.html#ini.auto-prepend-file"
>auto_prepend_file</A
> or <A
HREF="configuration.directives.html#ini.auto-append-file"
>auto_append_file</A
>
    configuration options in <A
HREF="configuration.html#configuration.file"
>the
    configuration file</A
>, then that script file's execution is
    ended.
   </P
><P
>For more information, see <A
HREF="functions.returning-values.html"
>Returning values</A
>.
   </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
     Note that since <A
HREF="function.return.html"
><B
CLASS="function"
>return()</B
></A
> is a language
     construct and not a function, the parentheses surrounding its
     arguments are <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>not</I
></SPAN
> required--in fact, it is
     more common to leave them out than to use them, although it
     doesn't matter one way or the other.
    </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="control-structures.declare.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.require.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><TT
CLASS="literal"
>declare</TT
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="control-structures.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.require.html"
><B
CLASS="function"
>require()</B
></A
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>