Sophie

Sophie

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

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

<HTML
><HEAD
><TITLE
>Predefined Variables</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="List of Reserved Words"
HREF="reserved.html"><LINK
REL="PREVIOUS"
TITLE="List of Reserved Words"
HREF="reserved.html"><LINK
REL="NEXT"
TITLE="Predefined Classes"
HREF="reserved.classes.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="reserved.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Appendix G. List of Reserved Words</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="reserved.classes.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="reserved.variables"
></A
>Predefined Variables</H1
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="reserved.variables.server"
></A
>Server variables: <TT
CLASS="varname"
>$_SERVER</TT
></H2
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
      Introduced in 4.1.0. In earlier versions, use
      <TT
CLASS="varname"
>$HTTP_SERVER_VARS</TT
>.
     </P
></BLOCKQUOTE
></DIV
><P
>&#13;     <TT
CLASS="varname"
>$_SERVER</TT
> is an array containing information
     such as headers, paths, and script locations. The entries in this
     array are created by the webserver. There is no guarantee that
     every webserver will provide any of these; servers may omit some,
     or provide others not listed here. That said, a large number of
     these variables are accounted for in the <A
HREF="http://hoohoo.ncsa.uiuc.edu/cgi/env.html"
TARGET="_top"
>CGI 1.1 specification</A
>, so you should
     be able to expect those.
    </P
><P
>&#13;     This is a 'superglobal', or automatic global, variable. This
     simply means that it is available in all scopes throughout a
     script. You don't need to do a <B
CLASS="command"
>global
     $_SERVER;</B
> to access it within functions or methods, as
     you do with <TT
CLASS="varname"
>$HTTP_SERVER_VARS</TT
>.
    </P
><P
>&#13;     <TT
CLASS="varname"
>$HTTP_SERVER_VARS</TT
> contains the same initial
     information, but is not an autoglobal. (Note that
     <TT
CLASS="varname"
>$HTTP_SERVER_VARS</TT
> and <TT
CLASS="varname"
>$_SERVER</TT
>
     are different variables and that PHP handles them as such)
    </P
><P
>&#13;     If the <A
HREF="configuration.directives.html#ini.register-globals"
>register_globals</A
> directive
     is set, then these variables will also be made available in the
     global scope of the script; i.e., separate from the
     <TT
CLASS="varname"
>$_SERVER</TT
> and <TT
CLASS="varname"
>$HTTP_SERVER_VARS</TT
> 
     arrays.  For related information, see the security chapter titled 
     <A
HREF="security.registerglobals.html"
>Using Register
      Globals</A
>. These individual globals are not autoglobals.
    </P
><P
>&#13;     You may or may not find any of the following elements in
     $_SERVER. Note that few, if any, of these will be available (or
     indeed have any meaning) if running PHP on the command line.
    </P
><P
>&#13;     <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
>'<TT
CLASS="varname"
>PHP_SELF</TT
>'</DT
><DD
><P
>&#13;         The filename of the currently executing script, relative to
         the document root. For instance,
         <TT
CLASS="varname"
>$_SERVER['PHP_SELF']</TT
> in a script at the
         address <TT
CLASS="filename"
>http://example.com/test.php/foo.bar</TT
>
         would be <TT
CLASS="filename"
>/test.php/foo.bar</TT
>.
        </P
><P
>&#13;         If PHP is running as a command-line processor, this variable
         is not available.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>argv</TT
>'</DT
><DD
><P
>&#13;         Array of arguments passed to the script. When the script is
         run on the command line, this gives C-style access to the
         command line parameters. When called via the GET method, this
         will contain the query string.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>argc</TT
>'</DT
><DD
><P
>&#13;         Contains the number of command line parameters passed to the
         script (if run on the command line).
        </P
></DD
><DT
>'<TT
CLASS="varname"
>GATEWAY_INTERFACE</TT
>'</DT
><DD
><P
>&#13;         What revision of the CGI specification the server is using;
         i.e. '<TT
CLASS="literal"
>CGI/1.1</TT
>'.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>SERVER_NAME</TT
>'</DT
><DD
><P
>&#13;         The name of the server host under which the current script is
         executing. If the script is running on a virtual host, this
         will be the value defined for that virtual host.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>SERVER_SOFTWARE</TT
>'</DT
><DD
><P
>&#13;         Server identification string, given in the headers when
         responding to requests.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>SERVER_PROTOCOL</TT
>'</DT
><DD
><P
>&#13;         Name and revision of the information protocol via which the
         page was requested; i.e. '<TT
CLASS="literal"
>HTTP/1.0</TT
>';
        </P
></DD
><DT
>'<TT
CLASS="varname"
>REQUEST_METHOD</TT
>'</DT
><DD
><P
>&#13;         Which request method was used to access the page; i.e. '<TT
CLASS="literal"
>GET</TT
>',
         '<TT
CLASS="literal"
>HEAD</TT
>', '<TT
CLASS="literal"
>POST</TT
>', '<TT
CLASS="literal"
>PUT</TT
>'.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>QUERY_STRING</TT
>'</DT
><DD
><P
>&#13;         The query string, if any, via which the page was accessed.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>DOCUMENT_ROOT</TT
>'</DT
><DD
><P
>&#13;         The document root directory under which the current script is
         executing, as defined in the server's configuration file.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>HTTP_ACCEPT</TT
>'</DT
><DD
><P
>&#13;         Contents of the <TT
CLASS="literal"
>Accept:</TT
> header from the
         current request, if there is one.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>HTTP_ACCEPT_CHARSET</TT
>'</DT
><DD
><P
>&#13;         Contents of the <TT
CLASS="literal"
>Accept-Charset:</TT
> header
         from the current request, if there is one. Example:
         '<TT
CLASS="literal"
>iso-8859-1,*,utf-8</TT
>'.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>HTTP_ACCEPT_ENCODING</TT
>'</DT
><DD
><P
>&#13;         Contents of the <TT
CLASS="literal"
>Accept-Encoding:</TT
> header
         from the current request, if there is one. Example: '<TT
CLASS="literal"
>gzip</TT
>'.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>HTTP_ACCEPT_LANGUAGE</TT
>'</DT
><DD
><P
>&#13;         Contents of the <TT
CLASS="literal"
>Accept-Language:</TT
> header
         from the current request, if there is one. Example: '<TT
CLASS="literal"
>en</TT
>'.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>HTTP_CONNECTION</TT
>'</DT
><DD
><P
>&#13;         Contents of the <TT
CLASS="literal"
>Connection:</TT
> header from
         the current request, if there is one. Example: '<TT
CLASS="literal"
>Keep-Alive</TT
>'.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>HTTP_HOST</TT
>'</DT
><DD
><P
>&#13;         Contents of the <TT
CLASS="literal"
>Host:</TT
> header from the
         current request, if there is one.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>HTTP_REFERER</TT
>'</DT
><DD
><P
>&#13;         The address of the page (if any) which referred the user
         agent to the current page. This is set by the user agent. Not
         all user agents will set this, and some provide the ability
         to modify <TT
CLASS="varname"
>HTTP_REFERER</TT
> as a feature. In
         short, it cannot really be trusted.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>HTTP_USER_AGENT</TT
>'</DT
><DD
><P
>&#13;         Contents of the <TT
CLASS="literal"
>User_Agent:</TT
> header from
         the current request, if there is one. This is a string
         denoting the user agent being which is accessing the page. A
         typical example is: <TT
CLASS="computeroutput"
>Mozilla/4.5 [en] (X11; U;
         Linux 2.2.9 i586)</TT
>. Among other things, you
         can use this value with <A
HREF="function.get-browser.html"
><B
CLASS="function"
>get_browser()</B
></A
> to
         tailor your page's output to the capabilities of the user
         agent.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>REMOTE_ADDR</TT
>'</DT
><DD
><P
>&#13;         The IP address from which the user is viewing the current
         page.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>REMOTE_HOST</TT
>'</DT
><DD
><P
>&#13;         The Host name from which the user is viewing the current
         page.  The reverse dns lookup is based off the 
         <TT
CLASS="varname"
>REMOTE_ADDR</TT
> of the user.
        </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
          Your web server must be configured to create this variable. For
          example in Apache you'll need <TT
CLASS="literal"
>HostnameLookups On</TT
>
          inside <TT
CLASS="filename"
>httpd.conf</TT
> for it to exist.  See also
          <A
HREF="function.gethostbyaddr.html"
><B
CLASS="function"
>gethostbyaddr()</B
></A
>.
         </P
></BLOCKQUOTE
></DIV
></DD
><DT
>'<TT
CLASS="varname"
>REMOTE_PORT</TT
>'</DT
><DD
><P
>&#13;         The port being used on the user's machine to communicate with
         the web server.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>SCRIPT_FILENAME</TT
>'</DT
><DD
><P
>&#13;         The absolute pathname of the currently executing script.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>SERVER_ADMIN</TT
>'</DT
><DD
><P
>&#13;         The value given to the SERVER_ADMIN (for Apache) directive in
         the web server configuration file. If the script is running
         on a virtual host, this will be the value defined for that
         virtual host.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>SERVER_PORT</TT
>'</DT
><DD
><P
>&#13;         The port on the server machine being used by the web server
         for communication. For default setups, this will be '<TT
CLASS="literal"
>80</TT
>';
         using SSL, for instance, will change this to whatever your
         defined secure HTTP port is.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>SERVER_SIGNATURE</TT
>'</DT
><DD
><P
>&#13;         String containing the server version and virtual host name
         which are added to server-generated pages, if enabled.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>PATH_TRANSLATED</TT
>'</DT
><DD
><P
>&#13;         Filesystem- (not document root-) based path to the current
         script, after the server has done any virtual-to-real
         mapping.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>SCRIPT_NAME</TT
>'</DT
><DD
><P
>&#13;         Contains the current script's path. This is useful for pages
         which need to point to themselves.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>REQUEST_URI</TT
>'</DT
><DD
><P
>&#13;         The URI which was given in order to access this page; for
         instance, '<TT
CLASS="literal"
>/index.html</TT
>'.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>PHP_AUTH_USER</TT
>'</DT
><DD
><P
>&#13;         When running under Apache as module doing HTTP authentication this
         variable is set to the username provided by the user.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>PHP_AUTH_PW</TT
>'</DT
><DD
><P
>&#13;         When running under Apache as module doing HTTP authentication this
         variable is set to the password provided by the user.
        </P
></DD
><DT
>'<TT
CLASS="varname"
>PHP_AUTH_TYPE</TT
>'</DT
><DD
><P
>&#13;         When running under Apache as module doing HTTP authenticated this
         variable is set to the authentication type.
        </P
></DD
></DL
></DIV
>
    </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="reserved.variables.environment"
></A
>Environment variables: <TT
CLASS="varname"
>$_ENV</TT
></H2
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
      Introduced in 4.1.0. In earlier versions, use
      <TT
CLASS="varname"
>$HTTP_ENV_VARS</TT
>.
     </P
></BLOCKQUOTE
></DIV
><P
>&#13;     These variables are imported into PHP's global namespace from the
     environment under which the PHP parser is running. Many are
     provided by the shell under which PHP is running and different
     systems are likely running different kinds of shells, a
     definitive list is impossible. Please see your shell's
     documentation for a list of defined environment variables.
    </P
><P
>&#13;     Other environment variables include the CGI variables, placed
     there regardless of whether PHP is running as a server module or
     CGI processor.
    </P
><P
>&#13;     This is a 'superglobal', or automatic global, variable. This
     simply means that it is available in all scopes throughout a
     script. You don't need to do a <B
CLASS="command"
>global
     $_ENV;</B
> to access it within functions or methods, as
     you do with <TT
CLASS="varname"
>$HTTP_ENV_VARS</TT
>.
    </P
><P
>&#13;     <TT
CLASS="varname"
>$HTTP_ENV_VARS</TT
> contains the same initial
     information, but is not an autoglobal. (Note that
     <TT
CLASS="varname"
>HTTP_ENV_VARS</TT
> and <TT
CLASS="varname"
>$_ENV</TT
>
     are different variables and that PHP handles them as such)
    </P
><P
>&#13;     If the <A
HREF="configuration.directives.html#ini.register-globals"
>register_globals</A
> directive
     is set, then these variables will also be made available in the
     global scope of the script; i.e., separate from the
     <TT
CLASS="varname"
>$_ENV</TT
> and <TT
CLASS="varname"
>$HTTP_ENV_VARS</TT
> 
     arrays.  For related information, see the security chapter titled 
     <A
HREF="security.registerglobals.html"
>Using Register
      Globals</A
>. These individual globals are not autoglobals.
    </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="reserved.variables.cookies"
></A
>HTTP Cookies: <TT
CLASS="varname"
>$_COOKIE</TT
></H2
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
      Introduced in 4.1.0. In earlier versions, use
      <TT
CLASS="varname"
>$HTTP_COOKIE_VARS</TT
>.
     </P
></BLOCKQUOTE
></DIV
><P
>&#13;     An associative array of variables passed to the current script
     via HTTP cookies.  Automatically global in any scope. 
    </P
><P
>&#13;     This is a 'superglobal', or automatic global, variable. This
     simply means that it is available in all scopes throughout a
     script. You don't need to do a <B
CLASS="command"
>global
     $_COOKIE;</B
> to access it within functions or methods, as
     you do with <TT
CLASS="varname"
>$HTTP_COOKIE_VARS</TT
>.
    </P
><P
>&#13;     <TT
CLASS="varname"
>$HTTP_COOKIE_VARS</TT
> contains the same initial
     information, but is not an autoglobal. (Note that
     <TT
CLASS="varname"
>HTTP_COOKIE_VARS</TT
> and <TT
CLASS="varname"
>$_COOKIE</TT
>
     are different variables and that PHP handles them as such)
    </P
><P
>&#13;     If the <A
HREF="configuration.directives.html#ini.register-globals"
>register_globals</A
> directive
     is set, then these variables will also be made available in the
     global scope of the script; i.e., separate from the
     <TT
CLASS="varname"
>$_COOKIE</TT
> and <TT
CLASS="varname"
>$HTTP_COOKIE_VARS</TT
> 
     arrays.  For related information, see the security chapter titled 
     <A
HREF="security.registerglobals.html"
>Using Register
      Globals</A
>. These individual globals are not autoglobals.
    </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="reserved.variables.get"
></A
>HTTP GET variables: <TT
CLASS="varname"
>$_GET</TT
></H2
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
      Introduced in 4.1.0. In earlier versions, use
      <TT
CLASS="varname"
>$HTTP_GET_VARS</TT
>.
     </P
></BLOCKQUOTE
></DIV
><P
>&#13;     An associative array of variables passed to the current script
     via the HTTP GET method.  Automatically global in any scope. 
    </P
><P
>&#13;     This is a 'superglobal', or automatic global, variable. This
     simply means that it is available in all scopes throughout a
     script. You don't need to do a <B
CLASS="command"
>global
     $_GET;</B
> to access it within functions or methods, as
     you do with <TT
CLASS="varname"
>$HTTP_GET_VARS</TT
>.
    </P
><P
>&#13;     <TT
CLASS="varname"
>$HTTP_GET_VARS</TT
> contains the same initial
     information, but is not an autoglobal. (Note that
     <TT
CLASS="varname"
>HTTP_GET_VARS</TT
> and <TT
CLASS="varname"
>$_GET</TT
>
     are different variables and that PHP handles them as such)
    </P
><P
>&#13;     If the <A
HREF="configuration.directives.html#ini.register-globals"
>register_globals</A
> directive
     is set, then these variables will also be made available in the
     global scope of the script; i.e., separate from the
     <TT
CLASS="varname"
>$_GET</TT
> and <TT
CLASS="varname"
>$HTTP_GET_VARS</TT
> 
     arrays.  For related information, see the security chapter titled 
     <A
HREF="security.registerglobals.html"
>Using Register
      Globals</A
>. These individual globals are not autoglobals.
    </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="reserved.variables.post"
></A
>HTTP POST variables: <TT
CLASS="varname"
>$_POST</TT
></H2
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
      Introduced in 4.1.0. In earlier versions, use
      <TT
CLASS="varname"
>$HTTP_POST_VARS</TT
>.
     </P
></BLOCKQUOTE
></DIV
><P
>&#13;     An associative array of variables passed to the current script
     via the HTTP POST method.  Automatically global in any scope. 
    </P
><P
>&#13;     This is a 'superglobal', or automatic global, variable. This
     simply means that it is available in all scopes throughout a
     script. You don't need to do a <B
CLASS="command"
>global
     $_POST;</B
> to access it within functions or methods, as
     you do with <TT
CLASS="varname"
>$HTTP_POST_VARS</TT
>.
    </P
><P
>&#13;     <TT
CLASS="varname"
>$HTTP_POST_VARS</TT
> contains the same initial
     information, but is not an autoglobal. (Note that
     <TT
CLASS="varname"
>HTTP_POST_VARS</TT
> and <TT
CLASS="varname"
>$_POST</TT
>
     are different variables and that PHP handles them as such)
    </P
><P
>&#13;     If the <A
HREF="configuration.directives.html#ini.register-globals"
>register_globals</A
> directive
     is set, then these variables will also be made available in the
     global scope of the script; i.e., separate from the
     <TT
CLASS="varname"
>$_POST</TT
> and <TT
CLASS="varname"
>$HTTP_POST_VARS</TT
> 
     arrays.  For related information, see the security chapter titled 
     <A
HREF="security.registerglobals.html"
>Using Register
      Globals</A
>. These individual globals are not autoglobals.
    </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="reserved.variables.files"
></A
>HTTP File upload variables: <TT
CLASS="varname"
>$_FILES</TT
></H2
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
      Introduced in 4.1.0. In earlier versions, use
      <TT
CLASS="varname"
>$HTTP_POST_FILES</TT
>.
     </P
></BLOCKQUOTE
></DIV
><P
>&#13;     An associative array of items uploaded to the current script
     via the HTTP POST method.  Automatically global in any scope. 
    </P
><P
>&#13;     This is a 'superglobal', or automatic global, variable. This
     simply means that it is available in all scopes throughout a
     script. You don't need to do a <B
CLASS="command"
>global
     $_FILES;</B
> to access it within functions or methods, as
     you do with <TT
CLASS="varname"
>$HTTP_POST_FILES</TT
>.
    </P
><P
>&#13;     <TT
CLASS="varname"
>$HTTP_POST_FILES</TT
> contains the same
     information, but is not an autoglobal.
    </P
><P
>&#13;     If the <A
HREF="configuration.directives.html#ini.register-globals"
>register_globals</A
> directive
     is set, then these variables will also be made available in the
     global scope of the script; i.e., separate from the
     <TT
CLASS="varname"
>$_FILES</TT
> and <TT
CLASS="varname"
>$HTTP_POST_FILES</TT
> 
     arrays.  For related information, see the security chapter titled 
     <A
HREF="security.registerglobals.html"
>Using Register
      Globals</A
>. These individual globals are not autoglobals.
    </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="reserved.variables.request"
></A
>Request variables: <TT
CLASS="varname"
>$_REQUEST</TT
></H2
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
      Introduced in 4.1.0. There is no equivalent array in earlier
      versions. 
     </P
></BLOCKQUOTE
></DIV
><P
>&#13;     An associative array consisting of the contents of
     <TT
CLASS="varname"
>$_GET</TT
>, <TT
CLASS="varname"
>$_POST</TT
>,
     and <TT
CLASS="varname"
>$_COOKIE</TT
>.
    </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
      Prior to PHP 4.3.0, <TT
CLASS="varname"
>$_FILES</TT
> information was 
      also included into <TT
CLASS="varname"
>$_REQUEST</TT
>.
     </P
></BLOCKQUOTE
></DIV
><P
>&#13;     This is a 'superglobal', or automatic global, variable. This
     simply means that it is available in all scopes throughout a
     script. You don't need to do a <B
CLASS="command"
>global
     $_REQUEST;</B
> to access it within functions or methods.
    </P
><P
>&#13;     If the <A
HREF="configuration.directives.html#ini.register-globals"
>register_globals</A
> directive
     is set, then these variables will also be made available in the
     global scope of the script; i.e., separate from the
     <TT
CLASS="varname"
>$_REQUEST</TT
> array.  For related information, see
     the security chapter titled <A
HREF="security.registerglobals.html"
>Using Register
     Globals</A
>. These individual globals are not autoglobals.
    </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="reserved.variables.session"
></A
>Session variables: <TT
CLASS="varname"
>$_SESSION</TT
></H2
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
      Introduced in 4.1.0. In earlier versions, use
      <TT
CLASS="varname"
>$HTTP_SESSION_VARS</TT
>.
     </P
></BLOCKQUOTE
></DIV
><P
>&#13;     An associative array containing session variables available to
     the current script. See the <A
HREF="ref.session.html"
>Session
      functions</A
> documentation for more information on how this
     is used.
    </P
><P
>&#13;     This is a 'superglobal', or automatic global, variable. This
     simply means that it is available in all scopes throughout a
     script. You don't need to do a <B
CLASS="command"
>global
     $_SESSION;</B
> to access it within functions or methods, as
     you do with <TT
CLASS="varname"
>$HTTP_SESSION_VARS</TT
>.
    </P
><P
>&#13;     <TT
CLASS="varname"
>$HTTP_SESSION_VARS</TT
> contains the same
     information, but is not an autoglobal. 
    </P
><P
>&#13;     If the <A
HREF="configuration.directives.html#ini.register-globals"
>register_globals</A
> directive
     is set, then these variables will also be made available in the
     global scope of the script; i.e., separate from the
     <TT
CLASS="varname"
>$_SESSION</TT
> and <TT
CLASS="varname"
>$HTTP_SESSION_VARS</TT
> 
     arrays.  For related information, see the security chapter titled 
     <A
HREF="security.registerglobals.html"
>Using Register
      Globals</A
>. These individual globals are not autoglobals.
    </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="reserved.variables.globals"
></A
>Global variables: <TT
CLASS="varname"
>$GLOBALS</TT
></H2
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Note: </B
>
      <TT
CLASS="varname"
>$GLOBALS</TT
> has been available since PHP 3.0.0.
     </P
></BLOCKQUOTE
></DIV
><P
>&#13;     An associative array containing references to all variables which
     are currently defined in the global scope of the script. The
     variable names are the keys of the array.
    </P
><P
>&#13;     This is a 'superglobal', or automatic global, variable. This
     simply means that it is available in all scopes throughout a
     script. You don't need to do a <B
CLASS="command"
>global
     $GLOBALS;</B
> to access it within functions or methods.
    </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="reserved.variables.phperrormsg"
></A
>The previous error message: <TT
CLASS="varname"
>$php_errormsg</TT
></H2
><P
>&#13;     <TT
CLASS="varname"
>$php_errormsg</TT
> is a variable containing the
     text of the last error message generated by PHP. This variable
     will only be available within the scope in which the error
     occurred, and only if the <A
HREF="ref.errorfunc.html#ini.track-errors"
>track_errors</A
> configuration
     option is turned on (it defaults to off).
    </P
></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="reserved.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="reserved.classes.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>List of Reserved Words</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="reserved.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Predefined Classes</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>