ae              Sun May 19 22:34:33 2002 EDT

  Modified files:              
    /phpdoc-pt_BR/language      variables.xml 
    /phpdoc-pt_BR       translation.xml 
  Log:
  language.xml review
  
Index: phpdoc-pt_BR/language/variables.xml
diff -u phpdoc-pt_BR/language/variables.xml:1.7 phpdoc-pt_BR/language/variables.xml:1.8
--- phpdoc-pt_BR/language/variables.xml:1.7     Sat Apr 20 03:18:19 2002
+++ phpdoc-pt_BR/language/variables.xml Sun May 19 22:34:33 2002
@@ -1,17 +1,14 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- EN-Revision: 1.2 Maintainer: andre_ae Status: working -->
+<!-- EN-Revision: 1.46 Maintainer: ae Status: ready -->
  <chapter id="language.variables">
-  <title>Variables</title>
-  
+  <title>Vari�veis</title>
+
   <sect1 id="language.variables.basics">
-   <title>Basics</title>
+   <title>Introdu��o</title>
 
    <simpara>
-    As vari�veis no PHP s�o representadas por um cifr�o($) seguido pelo
-    nome da vari�vel.  Os nomes de vari�vel no PHP fazem distin��o entre
-    mai�sculas e min�sculas.
-    Variables in PHP are represented by a dollar sign followed by the
-    name of the variable. The variable name is case-sensitive.
+    As vari�veis no PHP s�o representadas por um cifr�o ($) seguido pelo
+    nome da vari�vel. Os nomes de vari�vel no PHP fazem distin��o entre mai�sculas e 
+min�sculas.
    </simpara>
 
    <para>
@@ -21,81 +18,90 @@
     express�o regular isto poderia ser representado desta forma:
     '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
    </para>
-   
+
    <note>
     <simpara>
-     Para nosso prop�sito aqui, letras s�o a-z, A-Z e os caracteres
+     Para nossos prop�sitos, as letras a-z, A-Z e os caracteres
      ASCII de 127 a 255 (0x7f-0xff).
     </simpara>
    </note>
 
    <para>
     <informalexample>
-     <programlisting role="php"> 
+     <programlisting role="php">
+<![CDATA[
 $var = "Bob";
 $Var = "Joe";
-echo "$var, $Var";      // imprime "Bob, Joe"
+echo "$var, $Var";      // exibe "Bob, Joe"
 
-$4site = 'not yet';     // inv�lido; come�a com algarismo
-$_4site = 'not yet';    // v�lido; come�a com sublinhado
-$t�yte = 'mansikka';    // v�lido; '�' � ASCII 228.
+$4site = 'not yet';     // inv�lido; come�a com um n�mero
+$_4site = 'not yet';    // v�lido; come�a com um sublinhado
+$t�yte = 'mansikka';    // v�lido; '�' � um caracter ASCII 228.
+]]>
      </programlisting>
     </informalexample>
    </para>
 
    <para>
-    No PHP 3 as vari�veis s�o sempre atribu�das por valor.  Isto significa
-    dizer que quando voc� atribui uma express�o a uma vari�vel, o valor
+    No PHP 3, as vari�veis s�o sempre atribu�das por valor. Isto significa
+    que quando voc� atribui uma express�o a uma vari�vel, o valor
     da express�o original � copiado integralmente para a vari�vel de destino.
-    Isto significa que, ap�s atribuir o valor de uma vari�vel a
-       outra, a altera��o de uma destas vari�veis n�o afetar� a outra.
-       Para mairoes informa��es sobre este tipo de atribui��o, veja <link
+    Isto significa tamb�m que, ap�s atribuir o valor de uma vari�vel a
+    outra, a altera��o de uma destas vari�veis
+    n�o afetar� a outra. Para maiores informa��es sobre este tipo de
+    atribui��o, veja <link
     linkend="language.expressions">Express�es</link>.
    </para>
    <para>
-       PHP 4 oferece um outro meio de atribuir valores a vari�veis:
-       <emphasis>atribui��o por refer�ncia</emphasis>.  Isto significa que
-       a nova vari�vel simplesmente referencia (em outras palavras, "torna-se
-       um apelido para" ou "aponta para") a vari�vel original.  Altera��es na 
-       nova vari�vel afetam a original e vice versa.  Isto significa tamb�m que 
-       nenhuma c�pia � realizada, de modo que a atribui��o ocorre mais rapidamente.
-       Entretanto, qualquer aumento de velocidade s� ser� realmente notado
-       em *loops* complexos ou em atribui��es de grandes matrizes (*arrays*) ou 
objetos.
+    O PHP 4 oferece um outro meio de atribuir valores a vari�veis: a
+    <emphasis>atribui��o por refer�ncia</emphasis>. Isto significa que
+    a nova vari�vel simplesmente referencia (em outras palavras, "torna-se
+    um apelido para" ou "aponta para") a vari�vel original.  Altera��es na
+    nova vari�vel afetam a original e vice versa.  Isto significa tamb�m que
+    nenhuma c�pia � realizada, de modo que a atribui��o ocorre mais rapidamente.
+    Entretanto, qualquer aumento de velocidade s� ser� realmente notado
+    em *loops* complexos ou em atribui��es de grandes matrizes (*arrays*) ou objetos.
    </para>
    <para>
-       Para atribuir por refer�ncia, simplesmente adicione um e-comercial (&amp;)
-       na frente do nome da vari�vel que estiver sendo atribu�da (vari�vel de origem)
-       Por exemplo, o trecho de c�digo abaixo imprime 'My name is Bob' duas vezes:
+    Para atribuir por refer�ncia, simplesmente adicione um e-comercial (&amp;)
+    na frente do nome da vari�vel que estiver sendo atribu�da (vari�vel
+    de origem) Por exemplo, o trecho de c�digo abaixo imprime 'My
+    name is Bob' duas vezes:
 
     <informalexample>
      <programlisting role="php">
-&lt;?php
+<![CDATA[
+<?php
 $foo = 'Bob';              // Atribui o valor 'Bob' a vari�vel $foo
-$bar = &amp;$foo;          // Referecia $foo atrav�s de $bar.
+$bar = &$foo;              // Referecia $foo atrav�s de $bar.
 $bar = "My name is $bar";  // Altera $bar...
-echo $foo;                 // $foo � alterada tamb�m.
 echo $bar;
-?&gt;
+echo $foo;                 // $foo � alterada tamb�m.
+?>
+]]>
      </programlisting>
     </informalexample>
    </para>
 
    <para>
-       Uma observa��o importante a se fazer � que somente vari�veis
-       nomeadas podem ser atribu�das por refer�ncia.
+    Uma observa��o importante a se fazer: somente vari�veis
+    nomeadas podem ser atribu�das por refer�ncia.
     <informalexample>
      <programlisting role="php">
-&lt;?php
+<![CDATA[
+<?php
 $foo = 25;
-$bar = &amp;$foo;      // Esta atribui��o � v�lida.
-$bar = &amp;(24 * 7);  // Inv�lido; referencia uma express�o sem nome.
+$bar = &$foo;      // Esta atribui��o � v�lida.
+$bar = &(24 * 7);  // Inv�lido; referencia uma express�o sem nome.
 
-function test() {
+function test()
+{
    return 25;
 }
 
-$bar = &amp;test();    // Inv�lido.
-?&gt;
+$bar = &test();    // Inv�lido.
+?>
+]]>
      </programlisting>
     </informalexample>
    </para>
@@ -104,920 +110,669 @@
 
   <sect1 id="language.variables.predefined">
    <title>Vari�veis Predefinidas</title>
-   
-   <simpara>
-       PHP oferece um grande n�mero de vari�veis predefinidas para qualquer
-       script que ele execute.   Muitas destas vari�veis, entretanto, n�o podem
-       ser completamente documentadas uma vez dependem de diversos fatores como
-       o servidor no qual scripts s�o executados, a vers�o e configura��o deste
-       servidor, dentre outros fatores.  Algumas destas vari�veis n�o estar�o
-       dispon�veis quando o PHP for executado na linha de comando.
-   </simpara>
 
    <simpara>
-       A despeito destes fatores, temos aqui uma lista de vari�veis predefinidas
-       dispon�veis sob uma instala��o padr�o do PHP 3 executado como um m�dulo
-       em uma instala��o padr�o do <ulink url="&url.apache;">Apache</ulink> 1.3.6.
+    O PHP oferece um grande n�mero de vari�veis predefinidas para qualquer script
+    que ele execute. Muitas destas vari�veis, entretanto, n�o podem ser completamente
+    documentadas uma vez dependem de diversos fatores, como o servidor no qual 
+scripts s�o executados, a
+    vers�o e configura��o deste servidor e outros. Algumas destas
+    vari�veis n�o estar�o dispon�veis quando o PHP for executado na linha de
+    comando. Para uma lista destas vari�veis, veja a se��o
+    <link linkend="reserved.variables">Vari�veis reservadas</link>.
    </simpara>
 
-   <simpara>
-       Para obter uma lista de todas as vari�veis predefinidas (e um monte de
-       outras informa��es �teis), veja (e use) <function>phpinfo</function>.
-   </simpara>
-
-   <note>
-    <simpara>
-     This list is neither exhaustive nor intended to be. It is simply
-     a guideline as to what sorts of predefined variables you can
-     expect to have access to in your script.
-    </simpara>
-   </note>
-
-   <sect2 id="language.variables.predefined.apache">
-    <title>Apache variables</title>
-
-    <simpara>
-     These variables are created by the <ulink
-     url="&url.apache;">Apache</ulink> webserver. If you are running
-     another webserver, there is no guarantee that it will provide the
-     same variables; it may omit some, or provide others not listed
-     here. That said, a large number of these variables are accounted
-     for in the <ulink url="&url.cgispec;">CGI 1.1
-     specification</ulink>, so you should be able to expect those.
-    </simpara>
-    <simpara>
-     Note that few, if any, of these will be available (or indeed have
-     any meaning) if running PHP on the command line.
-    </simpara>
-
-    <para>
-     <variablelist>
-      <varlistentry>
-       <term>GATEWAY_INTERFACE</term>
-       <listitem>
-        <simpara>
-         What revision of the CGI specification the server is using;
-         i.e. 'CGI/1.1'.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>SERVER_NAME</term>
-       <listitem>
-        <simpara>
-         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.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>SERVER_SOFTWARE</term>
-       <listitem>
-        <simpara>
-         Server identification string, given in the headers when
-         responding to requests.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>SERVER_PROTOCOL</term>
-       <listitem>
-        <simpara>
-         Name and revision of the information protocol via which the
-         page was requested; i.e. 'HTTP/1.0';
-        </simpara>
-       </listitem>
-      </varlistentry>
-      
-      <varlistentry>
-       <term>REQUEST_METHOD</term>
-       <listitem>
-        <simpara>
-         Which request method was used to access the page; i.e. 'GET',
-         'HEAD', 'POST', 'PUT'.
-        </simpara>
-       </listitem>
-      </varlistentry>
-         
-      <varlistentry>
-       <term>QUERY_STRING</term>
-       <listitem>
-        <simpara>
-         The query string, if any, via which the page was accessed.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>DOCUMENT_ROOT</term>
-       <listitem>
-        <simpara>
-         The document root directory under which the current script is
-         executing, as defined in the server's configuration file.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>HTTP_ACCEPT</term>
-       <listitem>
-        <simpara>
-         Contents of the <literal>Accept:</literal> header from the
-         current request, if there is one.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>HTTP_ACCEPT_CHARSET</term>
-       <listitem>
-        <simpara>
-         Contents of the <literal>Accept-Charset:</literal> header
-         from the current request, if there is one. Example:
-         'iso-8859-1,*,utf-8'.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>HTTP_ENCODING</term>
-       <listitem>
-        <simpara>
-         Contents of the <literal>Accept-Encoding:</literal> header
-         from the current request, if there is one. Example: 'gzip'.
-        </simpara>
-       </listitem>
-      </varlistentry>
-      
-      <varlistentry>
-       <term>HTTP_ACCEPT_LANGUAGE</term>
-       <listitem>
-        <simpara>
-         Contents of the <literal>Accept-Language:</literal> header
-         from the current request, if there is one. Example: 'en'.
-        </simpara>
-       </listitem>
-      </varlistentry>
-      
-      <varlistentry>
-       <term>HTTP_CONNECTION</term>
-       <listitem>
-        <simpara>
-         Contents of the <literal>Connection:</literal> header from
-         the current request, if there is one. Example: 'Keep-Alive'.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>HTTP_HOST</term>
-       <listitem>
-        <simpara>
-         Contents of the <literal>Host:</literal> header from the
-         current request, if there is one.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>HTTP_REFERER</term>
-       <listitem>
-        <simpara>
-         The address of the page (if any) which referred the browser
-         to the current page. This is set by the user's browser; not
-         all browsers will set this.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>HTTP_USER_AGENT</term>
-       <listitem>
-        <simpara>
-         Contents of the <literal>User_Agent:</literal> header from
-         the current request, if there is one. This is a string
-         denoting the browser software being used to view the current
-         page; i.e. <computeroutput>Mozilla/4.5 [en] (X11; U; Linux
-         2.2.9 i586)</computeroutput>. Among other things, you can use
-         this value with <function>get_browser</function> to tailor
-         your page's functionality to the capabilities of the user's
-         browser.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>REMOTE_ADDR</term>
-       <listitem>
-        <simpara>
-         The IP address from which the user is viewing the current
-         page.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>REMOTE_PORT</term>
-       <listitem>
-        <simpara>
-         The port being used on the user's machine to communicate with
-         the web server.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>SCRIPT_FILENAME</term>
-       <listitem>
-        <simpara>
-         The absolute pathname of the currently executing script.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>SERVER_ADMIN</term>
-       <listitem>
-        <simpara>
-         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.
-        </simpara>
-       </listitem>
-      </varlistentry>
-      
-      <varlistentry>
-       <term>SERVER_PORT</term>
-       <listitem>
-        <simpara>
-         The port on the server machine being used by the web server
-         for communication. For default setups, this will be '80';
-         using SSL, for instance, will change this to whatever your
-         defined secure HTTP port is.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>SERVER_SIGNATURE</term>
-       <listitem>
-        <simpara>
-         String containing the server version and virtual host name
-         which are added to server-generated pages, if enabled.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>PATH_TRANSLATED</term>
-       <listitem>
-        <simpara>
-         Filesystem- (not document root-) based path to the current
-         script, after the server has done any virtual-to-real
-         mapping.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>SCRIPT_NAME</term>
-       <listitem>
-        <simpara>
-         Contains the current script's path. This is useful for pages
-         which need to point to themselves.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>REQUEST_URI</term>
-       <listitem>
-        <simpara>
-         The URI which was given in order to access this page; for
-         instance, '/index.html'.
-        </simpara>
-       </listitem>
-      </varlistentry>
-     </variablelist>
-    </para>
-
-   </sect2>
-
-   <sect2 id="language.variables.predefined.environment">
-    <title>Environment variables</title>
-
+   <warning>
     <simpara>
-     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.
+     No PHP 4.2.0 e posteriores, a variedade de vari�veis predefinidas
+     dispon�veis no escopo global foi modificada. Par�metros
+     individuais e vari�veis do servidor <emphasis>por default n�o</emphasis>
+     s�o dispon�veis diretamente no escopo global: elas s�o
+     colocadas dentro dos <link
+     linkend="language.variables.superglobals">arrays
+     superglobais</link>.
     </simpara>
     <simpara>
-     Other environment variables include the CGI variables, placed
-     there regardless of whether PHP is running as a server module or
-     CGI processor.
+     Voc� tamb�m pode for�ar o antigo comportamento configurando <link
+     linkend="ini.register-globals">register_globals</link> para 'On' em
+     seu arquivo &php.ini;.
     </simpara>
-       
-   </sect2>
-
-   <sect2 id="language.variables.predefined.php">
-    <title>PHP variables</title>
-    
     <simpara>
-     These variables are created by PHP itself. The
-     <varname>$HTTP_*_VARS</varname> variables are available only if
-     the <link linkend="ini.track-vars">track_vars</link>
-     configuration is turned on. When enabled, the variables are
-     always set, even if they are empty arrays. This prevents
-     a malicious user from spoofing these variables.
+     Para maiores informa��es desta modifica��o, veja 
+     o <ulink url="&url.php.release4.1.0;">PHP 4.1.0 Release
+     Announcement</ulink>.
     </simpara>
+   </warning>
 
-    <note>
-     <para>
-      As of PHP 4.0.3, <link
-      linkend="ini.track-vars">track_vars</link> is always turned on,
-      regardless of the configuration file setting.
-     </para>
-    </note>
+   <simpara>
+    Desde a vers�o 4.1.0, o PHP fornece um conjunto de arrays predefinidos
+    contendo as vari�veis do servidor web (se aplic�vel), as
+    vari�veis ambiente e as entradas do usu�rio. Esses novos arrays s�o especiais
+    pelo motivo que s�o automaticamente globais (significa que s�o automaticamente
+    dispon�veis em qualquer escopo. Por causa disso, s�o tamb�m conhecidas como
+    'autoglobais' ou 'superglobais' (N�o h� um mecanismo no PHP para
+    superglobais definidas pelo usu�rio) As superglobais s�o listadas abaixo.
+    Entretanto, para uma explica��o de seu conte�do e detalhes sobre
+    as vari�veis predefinidas do PHP e sua natureza, veja a se��o
+    <link linkend="reserved.variables">Vari�veis Predefinidas</link>.
+   </simpara>
 
-    <para>
-     If the <link
-     linkend="ini.register-globals">register_globals</link> directive
-     is set, then these variables will also be made available in the
-     global scope of the script; i.e., separate from the
-     <varname>$HTTP_*_VARS</varname> arrays. This feature should be
-     used with care, and turned off if possible; while the
-     <varname>$HTTP_*_VARS</varname> variables are safe, the bare
-     global equivalents can be overwritten by user input, with
-     possibly malicious intent. If you cannot turn off <link
-     linkend="ini.register-globals">register_globals</link>, you must
-     take whatever steps are necessary to ensure that the data you are
-     using is safe.
-    </para>
-    
-    <para>
-     <variablelist>
-      <varlistentry>
-       <term>argv</term>
-       <listitem>
-        <simpara>
-         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.
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>argc</term>
-       <listitem>
-        <simpara>
-         Contains the number of command line parameters passed to the
-         script (if run on the command line).
-        </simpara>
-       </listitem>
-      </varlistentry>
-
-      <varlistentry>
-       <term>PHP_SELF</term>
-       <listitem>
-        <simpara>
-         The filename of the currently executing script, relative to
-         the document root. If PHP is running as a command-line
-         processor, this variable is not available.
-        </simpara>
-       </listitem>
-      </varlistentry>
-         
-      <varlistentry>
-       <term>HTTP_COOKIE_VARS</term>
-       <listitem>
-        <simpara>
-         An associative array of variables passed to the current
-         script via HTTP cookies. 
-        </simpara>
-       </listitem>
-      </varlistentry>
-      
-      <varlistentry>
-       <term>HTTP_GET_VARS</term>
-       <listitem>
-        <simpara>
-         An associative array of variables passed to the current
-         script via the HTTP GET method.
-        </simpara>
-       </listitem>
-      </varlistentry>
-      
-      <varlistentry>
-       <term>HTTP_POST_VARS</term>
-       <listitem>
-        <simpara>
-         An associative array of variables passed to the current
-         script via the HTTP POST method.
-        </simpara>
-       </listitem>
-      </varlistentry>
-    
-      <varlistentry>
-       <term>HTTP_POST_FILES</term>
-       <listitem>
-        <simpara>
-         An associative array of variables containing information
-         about files uploaded via the HTTP POST method. See <link
-         linkend="features.file-upload.post-method">POST method
-         uploads</link> for information on the contents of
-         <varname>$HTTP_POST_FILES</varname>.
-        </simpara>
-        <para>
-         <varname>$HTTP_POST_FILES</varname> is available only in PHP
-         4.0.0 and later.
-        </para>
-       </listitem>
-      </varlistentry>
-  
+   <variablelist id="language.variables.superglobals">
+    <title>Superglobais do PHP</title>
     <varlistentry>
-       <term>HTTP_ENV_VARS</term>
-       <listitem>
-        <simpara>
-         An associative array of variables passed to the current
-         script via the parent environment. 
-        </simpara>
-       </listitem>
-      </varlistentry>
-
+     <term><link linkend="reserved.variables.globals">$GLOBALS</link></term>
+     <listitem>
+      <simpara>
+       Cont�m um refer�ncia para todas as vari�veis que s�o atualmente
+       dispon�veis dentro do escopo global do script. As chaves
+       desse array s�o os nomes das vari�veis globais.
+      </simpara>
+     </listitem>
+    </varlistentry>
     <varlistentry>
-       <term>HTTP_SERVER_VARS</term>
-       <listitem>
-        <simpara>
-         An associative array of variables passed to the current
-         script from the HTTP server. These variables are analogous to
-         the Apache variables described above.
-        </simpara>
-       </listitem>
-      </varlistentry>
-     </variablelist>
-    </para>
-       
-   </sect2>
+     <term><link linkend="reserved.variables.server">$_SERVER</link></term>
+     <listitem>
+      <simpara>
+       Vari�veis criadas pelo servidor web ou diretamente relacionadas
+       ao ambiente de execu��o do script atual. An�logo
+       ao antigo array <varname>$HTTP_SERVER_VARS</varname> (que
+       ainda continua dispon�vel, mas em decad�ncia).
+      </simpara>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><link linkend="reserved.variables.get">$_GET</link></term>
+     <listitem>
+      <simpara>
+       Vari�veis postadas para o script via m�todo HTTP GET. An�logo ao
+       antigo array <varname>$HTTP_GET_VARS</varname> (que
+       ainda continua dispon�vel, mas em decad�ncia).
+      </simpara>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><link linkend="reserved.variables.post">$_POST</link></term>
+     <listitem>
+      <simpara>
+       Vari�veis postadas para o script via m�todo HTTP POST. An�logo ao
+       antigo array <varname>$HTTP_POST_VARS</varname> (que
+       ainda continua dispon�vel, mas em decad�ncia).
+      </simpara>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><link linkend="reserved.variables.cookies">$_COOKIE</link></term>
+     <listitem>
+      <simpara>
+       Vari�veis postadas para o script via cookies HTTP. An�logo ao
+       antigo array <varname>$HTTP_COOKIE_VARS</varname> (que
+       ainda continua dispon�vel, mas em decad�ncia).
+      </simpara>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><link linkend="reserved.variables.files">$_FILES</link></term>
+     <listitem>
+      <simpara>
+       Vari�veis postadas para o script via transfer�ncia de arquivos HTTP.
+       An�logo ao antigo array
+       <varname>$HTTP_POST_FILES</varname> (que ainda
+       continua dispon�vel, mas em decad�ncia). Veja <link
+       linkend="features.file-upload.post-method">uploads via
+       m�todo POST</link> para maiores informa��es.
+      </simpara>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><link linkend="reserved.variables.environment">$_ENV</link></term>
+     <listitem>
+      <simpara>
+       Vari�veis dispon�veis no script do ambiente de execu��o. An�logo ao
+       antigo array <varname>$HTTP_ENV_VARS</varname> (que
+       ainda continua dispon�vel, mas em decad�ncia).
+      </simpara>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><link linkend="reserved.variables.request">$_REQUEST</link></term>
+     <listitem>
+      <simpara>
+       Vari�veis postadas para o script por todas os mecanismos de input,
+       e que n�o podem ter seu conte�do garantido de qualquer forma. Note: quando 
+executando
+       da linha de comando, elas <emphasis>n�o</emphasis> incluem
+       as entidades <varname>argv</varname> e <varname>argc</varname>;
+       elas est�o presentes no array <varname>$_SERVER</varname>.
+       A presen�a e a ordem de inclus�o das vari�veis nesse array
+       � definida de acordo com a diretiva de configura��o <link
+       linkend="ini.variables-order">variables_order</link>.
+       Este array n�o tem um equivalente nas
+       vers�es anteriores do PHP 4.1.0.
+      </simpara>
+     </listitem>
+    </varlistentry>
+    <varlistentry>
+     <term><link linkend="reserved.variables.session">$_SESSION</link></term>
+     <listitem>
+      <simpara>
+       Vari�veis que est�o atualmente registradas na sess�o do
+       script. An�logo ao antigo array
+       <varname>$HTTP_SESSION_VARS</varname> (que ainda
+       continua dispon�vel, mas em decad�ncia). Veja a sess�o <link
+       linkend="ref.session">fun��es de manipula��o de Sess�es</link>
+       para maiores informa��es.
+      </simpara>
+     </listitem>
+    </varlistentry>
+   </variablelist>
 
   </sect1>
 
 
   <sect1 id="language.variables.scope">
-   <title>Variable scope</title>
+   <title>Escopo de vari�veis</title>
 
    <simpara>
-    The scope of a variable is the context within which it is defined.
-    For the most part all PHP variables only have a single scope.
-    This single scope spans included and required files as well.  For
-    example:
+    O escopo de uma vari�vel � o contexto onde ela foi definida.
+    A maior parte das vari�veis do PHP tem somente escopo local.
+    Este escopo local inclui os arquivos inclu�dos. Por
+    exemplo:
    </simpara>
    <informalexample>
     <programlisting role="php">
+<![CDATA[
 $a = 1;
 include "b.inc";
+]]>
     </programlisting>
    </informalexample>
    <simpara>
-    Here the <varname>$a</varname> variable will be available within
-    the included <filename>b.inc</filename> script.  However, within
-    user-defined functions a local function scope is introduced.  Any
-    variable used inside a function is by default limited to the local
-    function scope.  For example:
-   </simpara>
-    
+    Aqui a vari�vel <varname>$a</varname> estar� dispon�vel
+    no script inclu�do <filename>b.inc</filename>. Entretanto, com as
+    fun��es definidas pelo usu�rio, um escopo local � introduzido. Quaisquer
+    vari�veis utilizadas dento da fun��o � por default limitada dentro do
+    escopo local da fun��o. Por exemplo:
+</simpara>
+
    <informalexample>
-    <programlisting role="php"> 
-$a = 1; /* global scope */ 
+    <programlisting role="php">
+<![CDATA[
+$a = 1; /* escopo global */
 
-Function Test () { 
-    echo $a; /* reference to local scope variable */ 
-} 
+function Teste()
+{
+    echo $a; /* referencia uma vari�vel do escopo local (n�o definida) */
+}
 
-Test ();
+Test();
+]]>
     </programlisting>
    </informalexample>
 
    <simpara>
-    This script will not produce any output because the echo statement
-    refers to a local version of the <varname>$a</varname> variable,
-    and it has not been assigned a value within this scope.  You may
-    notice that this is a little bit different from the C language in
-    that global variables in C are automatically available to
-    functions unless specifically overridden by a local definition.
-    This can cause some problems in that people may inadvertently
-    change a global variable.  In PHP global variables must be
-    declared global inside a function if they are going to be used in
-    that function.  An example:
+    Este script n�o produz nenhuma sa�da porque a instru��o <function>echo</function>
+    refere-se a uma vers�o local da vari�vel <varname>$a</varname>,
+    e ela n�o tem nenhum valor assimilado nesse escopo. Essa � uma
+    pequena diferen�a da linguagem C quando
+    vari�veis globais s�o automaticamente dispon�veis para
+    fun��es sem sobreescrever uma eventual defini��o local.
+    Isto causa problemas quando as pessoas mudam
+    inadivertidamente uma vari�vel global. No PHP, as vari�veis globais precisam ser
+    declaradas globais dentro de uma fun��o se ela vai ser utilizada 
+    naquela fun��o. Um exemplo:
    </simpara>
 
    <informalexample>
     <programlisting role="php">
+<![CDATA[
 $a = 1;
 $b = 2;
 
-Function Sum () {
+function Soma()
+{
     global $a, $b;
 
     $b = $a + $b;
-} 
+}
 
-Sum ();
+Soma();
 echo $b;
+]]>
     </programlisting>
    </informalexample>
 
    <simpara>
-    The above script will output &quot;3&quot;.  By declaring
-    <varname>$a</varname> and <varname>$b</varname> global within the
-    function, all references to either variable will refer to the
-    global version.  There is no limit to the number of global
-    variables that can be manipulated by a function.
+    O script acima imprimir� &quot;3&quot;. Declarando
+    <varname>$a</varname> e <varname>$b</varname> globais na
+    fun��o, todas as refer�ncias a essas vari�veis referem-se a
+    vers�o global. N�o h� um limite para o n�mero de vari�veis
+    globais que podem ser manipuladas por uma fun��o.
    </simpara>
 
    <simpara>
-    A second way to access variables from the global scope is to use
-    the special PHP-defined <varname>$GLOBALS</varname> array.  The
-    previous example can be rewritten as:
+    Uma segunda maneira de acessar vari�veis do escopo global � utilizando
+    o array especial <varname>$GLOBALS</varname> definido pelo PHP. O
+    exemplo anterior poderia ser rescrito como:
    </simpara>
 
    <informalexample>
     <programlisting role="php">
+<![CDATA[
 $a = 1;
 $b = 2;
 
-Function Sum () {
+function Soma()
+{
     $GLOBALS["b"] = $GLOBALS["a"] + $GLOBALS["b"];
-} 
+}
 
-Sum ();
+Soma();
 echo $b;
+]]>
     </programlisting>
    </informalexample>
 
    <simpara>
-    The <varname>$GLOBALS</varname> array is an associative array with
-    the name of the global variable being the key and the contents of
-    that variable being the value of the array element.
+    <varname>$GLOBALS</varname> � um array associativo em que
+    o nome das vari�veis globais s�o suas chaves e o conte�do dessas
+    vari�veis s�o o valor do elemento do array.
    </simpara>
 
    <simpara>
-    Another important feature of variable scoping is the
-    <emphasis>static</emphasis> variable.  A static variable exists
-    only in a local function scope, but it does not lose its value
-    when program execution leaves this scope.  Consider the following
-    example:
+    Outro recurso importante do escopo de vari�veis � a
+    vari�vel <emphasis>est�tica</emphasis>. Uma vari�vel est�tica existe
+    somente no escopo local da fun��o, mas ela n�o perde seu valor
+    quando o n�vel de execu��o do programa deixa o escopo. Considere o seguinte
+    exemplo:
    </simpara>
 
    <informalexample>
     <programlisting role="php">
-Function Test () {
+<![CDATA[
+function Teste ()
+{
     $a = 0;
     echo $a;
     $a++;
 }
+]]>
     </programlisting>
    </informalexample>
 
    <simpara>
-    This function is quite useless since every time it is called it
-    sets <varname>$a</varname> to <literal>0</literal> and prints
-    &quot;0&quot;.  The <varname>$a</varname>++ which increments the
-    variable serves no purpose since as soon as the function exits the
-    <varname>$a</varname> variable disappears.  To make a useful
-    counting function which will not lose track of the current count,
-    the <varname>$a</varname> variable is declared static:
+    Essa fun��o � in�til partindo de que cada vez que ela � chamada, ela
+    coloca em <varname>$a</varname> o valor <literal>0</literal> e imprime
+    &quot;0&quot;. A instru��o <varname>$a</varname>++ , que aumenta o valor da
+    vari�vel n�o tem sentido desde que a fun��o sai e a
+    vari�vel <varname>$a</varname> desaparece. Para faze-la mais �til
+    como contadora sem deixar de perder o sua conta atual,
+    a vari�vel <varname>$a</varname> � declarada como est�tica:
    </simpara>
 
    <informalexample>
     <programlisting role="php">
-Function Test () {
+<![CDATA[
+function Teste()
+{
     static $a = 0;
     echo $a;
     $a++;
 }
+]]>
     </programlisting>
    </informalexample>
 
    <simpara>
-    Now, every time the Test() function is called it will print the
-    value of <varname>$a</varname> and increment it.
+    Agora, cada vez que a fun��o Teste() for chamada ele imprimir� o
+    valor de <varname>$a</varname> e o incrementar�.
    </simpara>
 
    <simpara>
-    Static variables also provide one way to deal with recursive
-    functions. A recursive function is one which calls itself.  Care
-    must be taken when writing a recursive function because it is
-    possible to make it recurse indefinitely.  You must make sure you
-    have an adequate way of terminating the recursion.  The following
-    simple function recursively counts to 10, using the static
-    variable <varname>$count</varname> to know when to stop:
+    Vari�veis est�ticas fornecem uma solu��o ideal para fun��es
+    recursivas. Uma fun��o recursiva � aquela se chama a si mesma. Cuidados
+    especiais precisam ser tomados quando escrevendo fun��es recursivas porque �
+    poss�vel que ela continue na recurs�o indefinidamente. Voc� tem de ter certeza
+    que h� uma maneira segura de terminar a recurs�o. A seguinte
+    fun��o recursiva conta at� 10, utilizando a vari�vel
+    est�tica <varname>$count</varname> para saber quando parar:
    </simpara>
 
    <informalexample>
     <programlisting role="php">
-Function Test () {
+<![CDATA[
+function Teste()
+{
     static $count = 0;
 
     $count++;
     echo $count;
-    if ($count &lt; 10) {
+    if ($count < 10) {
         Test ();
     }
     $count--;
 }
+]]>
     </programlisting>
    </informalexample>
 
   </sect1>
 
   <sect1 id="language.variables.variable">
-   <title>Variable variables</title>
+   <title>Vari�veis vari�veis</title>
 
    <simpara>
-    Sometimes it is convenient to be able to have variable variable
-    names.  That is, a variable name which can be set and used
-    dynamically.  A normal variable is set with a statement such as:
+    As vezes � conveniente poder trabalhar com vari�veis
+    vari�veis. Isto �, nomes de vari�veis que pode ser criadas e utilizadas
+    dinamicamente. Uma vari�vel normal � criada numa instru��o como:
    </simpara>
 
    <informalexample>
     <programlisting role="php">
+<![CDATA[
 $a = "hello";
+]]>
     </programlisting>
    </informalexample>
 
    <simpara>
-    A variable variable takes the value of a variable and treats that
-    as the name of a variable.  In the above example,
-    <emphasis>hello</emphasis>, can be used as the name of a variable
-    by using two dollar signs. i.e.
+    Uma vari�vel vari�vel pega o valor de uma vari�vel e a trata como
+    o nome de uma vari�vel. No exemplo acima,
+    <emphasis>hello</emphasis> pode ser utilizada como o nome de uma vari�vel
+    utilizando dois sinais de cifr�o:
    </simpara>
 
    <informalexample>
     <programlisting role="php">
+<![CDATA[
 $$a = "world";
+]]>
     </programlisting>
    </informalexample>
 
    <simpara>
-    At this point two variables have been defined and stored in the
-    PHP symbol tree: <varname>$a</varname> with contents "hello" and
-    <varname>$hello</varname> with contents "world".  Therefore, this
-    statement:
+    Neste ponto, duas vari�veis foram definidas e preservadas na
+    �rvore de s�mbolos do PHP: <varname>$a</varname> contendo "hello" e
+    <varname>$hello</varname> contendo "world". Da mesma forma, esta
+    instru��o:
    </simpara>
 
    <informalexample>
     <programlisting role="php">
+<![CDATA[
 echo "$a ${$a}";
+]]>
     </programlisting>
    </informalexample>
 
    <simpara>
-    produces the exact same output as:
+    produz a mesma saida que:
    </simpara>
 
    <informalexample>
-    <programlisting>
+    <programlisting role="php">
+<![CDATA[
 echo "$a $hello";
+]]>
     </programlisting>
    </informalexample>
 
    <simpara>
-    i.e. they both produce: <computeroutput>hello world</computeroutput>.
+    no caso: <computeroutput>hello world</computeroutput>.
    </simpara>
 
    <simpara>
-    In order to use variable variables with arrays, you have to
-    resolve an ambiguity problem.  That is, if you write
-    <varname>$$a[1]</varname> then the parser needs to know if you
-    meant to use <varname>$a[1]</varname> as a variable, or if you
-    wanted <varname>$$a</varname> as the variable and then the [1]
-    index from that variable.  The syntax for resolving this ambiguity
-    is: <varname>${$a[1]}</varname> for the first case and
-    <varname>${$a}[1]</varname> for the second.
+    Para poder utilizar vari�veis vari�veis com arrays, voc� precisa
+    resolver um problema de ambig�idade. Assim, se voc� escrever
+    <varname>$$a[1]</varname> ent�o o interpretador pode entender que
+    voc� quer usar <varname>$a[1]</varname> como uma vari�vel ou que
+    voc� quer usar <varname>$$a</varname> como uma vari�vel e [1]
+    como o �ndice dessa vari�vel. A sintaxe para resolver essa ambig�idade
+    � <varname>${$a[1]}</varname> para o primeiro caso e
+    <varname>${$a}[1]</varname> para o segundo.
    </simpara>
-  
+
+   <simpara>
+    Verifique que vari�veis vari�veis n�o podem ser utilizadas com as novas 
+superglobais do PHP.
+    Isto significa que voc� n�o pode fazer coisas como <varname>${$_GET}</varname>. 
+Se voc� est�
+    procurando uma maneira de manipular as superglobais como as antigas
+    HTTP_*_VARS, voc� deve tentar <link 
+linkend="language.references">referenci�-las</link>.
+   </simpara>
+
   </sect1>
 
   <sect1 id="language.variables.external">
-   <title>Variables from outside PHP</title>
+   <title>Vari�veis externas ao PHP</title>
 
    <sect2 id="language.variables.external.form">
-    <title>HTML Forms (GET and POST)</title>
+    <title>Formul�rios HTML (GET and POST)</title>
 
     <simpara>
-     When a form is submitted to a PHP script, any variables from that
-     form will be automatically made available to the script by
-     PHP. If the <link linkend="ini.track-vars">track_vars</link>
-     configuration option is turned on, then these variables will be
-     located in the associative arrays
+     Quando um formul�rio � submetido para um script PHP, qualquer vari�vel do
+     formul�rio ser� automaticamente dispon�vel para o script pelo
+     PHP. Se a diretiva de configura��o <link 
+linkend="ini.track-vars">track_vars</link>
+     estiver ativada, ent�o essas vari�veis estar�o
+     localizadas nos arrays associativos
      <varname>$HTTP_POST_VARS</varname>,
-     <varname>$HTTP_GET_VARS</varname>, and/or
-     <varname>$HTTP_POST_FILES</varname>, according to the
-     source of the variable in question.
+     <varname>$HTTP_GET_VARS</varname> e/ou
+     <varname>$HTTP_POST_FILES</varname>, de acordo com
+     a fonte da vari�vel em quest�o.
     </simpara>
 
     <para>
-     For more information on these variables, please read <link
-     linkend="language.variables.predefined">Predefined
-     variables</link>.
+     Para maiores informa��es sobre essas vei�veis, veja <link
+     linkend="language.variables.predefined">Vari�veis
+     Predefinidas</link>.
     </para>
 
     <para>
      <example>
-      <title>Simple form variable</title>
+      <title>Vari�veis simples de formul�rios</title>
       <programlisting role="php">
-&lt;form action="foo.php" method="post">
-    Name: &lt;input type="text" name="username">&lt;br>
-    &lt;input type="submit">
-&lt;/form>
+<![CDATA[
+<form action="foo.php" method="post">
+    Name: <input type="text" name="username"><br>
+    <input type="submit">
+</form>
+]]>
       </programlisting>
      </example>
     </para>
 
     <para>
-     When the above form is submitted, the value from the text input
-     will be available in
-     <varname>$HTTP_POST_VARS['username']</varname>. If the <link
+     Quando o formul�rio � submetido, o valor da caixa de texto
+     estar� dispon�vel em
+     <varname>$HTTP_POST_VARS['username']</varname>. Se a diretiva de configura��o 
+<link
      linkend="ini.register-globals">register_globals</link>
-     configuration directive is turned on, then the variable will also
-     be available as <varname>$username</varname> in the global scope.
+     estiver ativada, ent�o a estar� dispon�vel
+     a vari�vel <varname>$username</varname> no escopo global.
     </para>
 
+    <note>
+     <para>
+      A diretiva de configura��o <link 
+linkend="ini.magic-quotes-gpc">magic_quotes_gpc</link>
+      afeta os valores de GET, POST e Cookies. Se
+      estiver ativada, o valor (It's "PHP!") se tornar� automaticamente (It\'s 
+\"PHP!\").
+      Escaping � necess�rio para inser��o em bancos de dados. Veja tamb�m
+      <function>addslashes</function>, <function>stripslashes</function> e
+      <link linkend="ini.magic-quotes-sybase">magic_quotes_sybase</link>.
+     </para>
+    </note>
+
     <simpara>
-     PHP also understands arrays in the context of form variables. You
-     may, for example, group related variables together, or use this
-     feature to retrieve values from a multiple select
-     input:
+     O PHP entende arrays no contexto de vari�veis de formul�rios
+     (veja o <link linkend="faq.html">FAQ</link> relacionado). Voc� pode,
+     por exemplo, agrupar vari�veis relacionadas juntas, ou usar
+     esse recurso para receber valores de um campo de sele��o m�ltipla.
     </simpara>
 
     <para>
      <example>
-      <title>More complex form variables</title>
+      <title>Vari�veis de formul�rios complexos</title>
       <programlisting role="php">
-&lt;form action="array.php" method="post">
-    Name: &lt;input type="text" name="personal[name]">&lt;br>
-    Email: &lt;input type="text" name="personal[email]">&lt;br>
-    Beer: &lt;br>
-    &lt;select multiple name="beer[]">
-        &lt;option value="warthog">Warthog
-        &lt;option value="guinness">Guinness
-        &lt;option value="stuttgarter">Stuttgarter Schwabenbr&auml;u
-        &lt;/select>
-    &lt;input type="submit">
-&lt;/form>
+<![CDATA[
+<form action="array.php" method="post">
+    Name: <input type="text" name="personal[name]"><br>
+    Email: <input type="text" name="personal[email]"><br>
+    Beer: <br>
+    <select multiple name="beer[]">
+        <option value="warthog">Warthog
+        <option value="guinness">Guinness
+        <option value="stuttgarter">Stuttgarter Schwabenbr�u
+        </select>
+    <input type="submit">
+</form>
+]]>
       </programlisting>
      </example>
     </para>
 
     <para>
-     In PHP 3, the array form variable usage is limited to
-     single-dimensional arrays. In PHP 4, no such restriction applies.
+     No PHP 3, os arrays vari�veis de formul�rios eram limitados
+     a uma dimens�o. No PHP 4, essa restri��o n�o existe mais.
     </para>
 
     <sect3 id="language.variables.external.form.submit">
-     <title>IMAGE SUBMIT variable names</title>
+     <title>Nomes de vari�veis SUBMIT IMAGE</title>
 
      <simpara>
-      When submitting a form, it is possible to use an image instead
-      of the standard submit button with a tag like:</simpara>
+      Quando submetendo um formul�rio, � poss�vel de se utilizar imagens ao inv�s
+      do bot�o de submit padr�o com uma tag do tipo:</simpara>
 
      <informalexample>
       <programlisting role="php">
-&lt;input type=image src="image.gif" name="sub">
+<![CDATA[
+<input type="image" src="image.gif" name="sub">
+]]>
       </programlisting>
      </informalexample>
 
      <simpara>
-      When the user clicks somewhere on the image, the accompanying
-      form will be transmitted to the server with two additional
-      variables, sub_x and sub_y. These contain the coordinates of the
-      user click within the image.  The experienced may note that the
-      actual variable names sent by the browser contains a period
-      rather than an underscore, but PHP converts the period to an
-      underscore automatically.
+      Quando o usu�rio clica em algum lugar da imagem, o formul�rio
+      que o acompanha � transmitido para o servidor com duas vari�veis
+      adicionais, sub_x e sub_y. Eles cont�m a coordenadas do
+      clique do usu�rio na imagem. Os mais experientes percebem que os
+      atuais nomes dessas vari�veis enviados pelo browser cont�m um ponto
+      ao inv�s de um sublinhado, mas o PHP converte o ponto para um
+      sublinhado automaticamente.
      </simpara>
     </sect3>
 
    </sect2>
 
    <sect2 id="language.variables.external.cookies">
-    <title>HTTP Cookies</title>
+    <title>Cookies HTTP</title>
 
     <simpara>
-     PHP transparently supports HTTP cookies as defined by <ulink
-     url="&spec.cookies;">Netscape's Spec</ulink>.  Cookies are a
-     mechanism for storing data in the remote browser and thus
-     tracking or identifying return users.  You can set cookies using
-     the <function>SetCookie</function> function.  Cookies are part of
-     the HTTP header, so the SetCookie function must be called before
-     any output is sent to the browser.  This is the same restriction
-     as for the <function>header</function> function.  Any cookies
-     sent to you from the client will automatically be turned into a
-     PHP variable just like GET and POST method data.</simpara>
-
-    <simpara>
-     If you wish to assign multiple values to a single cookie, just
-     add <emphasis>[]</emphasis> to the cookie name.  For
-     example:
+     O PHP suporta transparentemente cookies HTTP como os definidos pela <ulink
+     url="&spec.cookies;">especifica��o da Netscape</ulink>. Cookies s�o um
+     mecanismo de armazenamento de dados no browser cliente e permite
+     o rastreamento ou identifica��o do retorno de usu�rios. Voc� pode criar cookies 
+com
+     a fun��o <function>setcookie</function>. Cookies s�o parte do
+     header HTTP, ent�o, a fun��o <function>setcookie</function> precisa ser chamada 
+antes
+     de qualquer sa�da ser enviada ao browser. Esta � a mesma restri��o
+     da fun��o <function>header</function>. Quaisquer cookies
+     enviados para voc� do cliente ser� automaticamente transformada em
+     vari�veis PHP assim como os dados postados via GET ou POST.</simpara>
+
+    <simpara>
+     Se voc� precisa armazenar m�ltiplos valores em um �nico cookies, basta
+     apenas acrescentar <emphasis>[]</emphasis> ao nome do cookie. Por
+     exemplo:
     </simpara>
 
     <informalexample>
      <programlisting role="php">
-SetCookie ("MyCookie[]", "Testing", time()+3600);
+<![CDATA[
+setcookie("MeuCookie[]", "Testando", time()+3600);
+]]>
      </programlisting>
     </informalexample>
 
     <simpara>
-     Note that a cookie will replace a previous cookie by the same
-     name in your browser unless the path or domain is different.  So,
-     for a shopping cart application you may want to keep a counter
-     and pass this along.  i.e.
+     Note que um cookie substituir� um anterior com o mesmo
+     nome em seu browser mesmo se o nome ou o caminho for diferente. Ent�o,
+     para uma aplica��o de carrinho de compras em que voc� quer ter um contador
+     e repass�-lo:
     </simpara>
 
     <example>
-     <title>SetCookie Example</title>
+     <title>Exemplo SetCookie</title>
      <programlisting role="php">
+<![CDATA[
 $Count++;
-SetCookie ("Count", $Count, time()+3600);
-SetCookie ("Cart[$Count]", $item, time()+3600);
+setcookie("Count", $Count, time()+3600);
+setcookie("Cart[$Count]", $item, time()+3600);
+]]>
      </programlisting>
     </example>
 
    </sect2>
 
    <sect2 id="language.variables.external.environment">
-    <title>Environment variables</title>
+    <title>Vari�veis ambiente</title>
 
     <para>
-     PHP automatically makes environment variables available as normal
-     PHP variables.
-     
+     O PHP automaticamente torna as vari�veis de ambiente dispon�veis como vari�veis
+     PHP normais.
+
      <informalexample>
       <programlisting role="php">
-echo $HOME;  /* Shows the HOME environment variable, if set. */
+<![CDATA[
+echo $HOME;  /* Exibe a vari�vel ambiente HOME, se existente. */
+]]>
       </programlisting>
      </informalexample>
     </para>
 
     <para>
-     Since information coming in via GET, POST and Cookie mechanisms
-     also automatically create PHP variables, it is sometimes best to
-     explicitly read a variable from the environment in order to make
-     sure that you are getting the right version.  The
-     <function>getenv</function> function can be used for this.  You
-     can also set an environment variable with the
-     <function>putenv</function> function.
+     Desde que as informa��es oriundas dos mecanismos GET, POST ou Cookie
+     s�o automaticamente criadas como vari�veis PHP, as vezes � melhor
+     fazer a leitura direto do ambiente de execu��o para ter certeza que
+     a esta obtendo a vers�o correta. A
+     fun��o <function>getenv</function> pode ser utilizada para isso. Voc�
+     tamb�m pode criar uma vari�vel de ambiente com a
+     fun��o <function>putenv</function>.
     </para>
    </sect2>
 
    <sect2 id="language.variables.external.dot-in-names">
-    <title>Dots in incoming variable names</title>
+    <title>Pontos em nomes de vari�veis postadas</title>
 
     <para>
-     Typically, PHP does not alter the names of variables when they
-     are passed into a script. However, it should be noted that the
-     dot (period, full stop) is not a valid character in a PHP
-     variable name. For the reason, look at it:
+     Normalmente o PHP n�o altera o nome de vari�veis quando elas
+     s�o passadas para o script. Entretanto, � necess�rio notar que o
+     ponto (ponto final) n�o � um caracter v�lido no nomes de
+     vari�veis do PHP. Para ilustrar, veja o seguinte exemplo:
      <programlisting role="php">
-$varname.ext;  /* invalid variable name */
+<![CDATA[
+$varname.ext;  /* nome de vari�vel inv�lido */
+]]>
      </programlisting>
-     Now, what the parser sees is a variable named
-     <varname>$varname</varname>, followed by the string concatenation
-     operator, followed by the barestring (i.e. unquoted string which
-     doesn't match any known key or reserved words) 'ext'. Obviously,
-     this doesn't have the intended result.
+     Dessa forma, o interpretador entende isso como uma vari�vel nomeada
+     <varname>$varname</varname>, seguida do operador de concatena��o
+     de strings, seguida de um identificador (uma string n�o delimitada que
+     n�o bate com nenhuma palavra chave ou reservada) 'ext'. Obviamente,
+     isso n�o tem os resultados pretendidos.
     </para>
 
     <para>
-     For this reason, it is important to note that PHP will
-     automatically replace any dots in incoming variable names with
-     underscores.
+     Nessa situa��o, � importante saber que o PHP
+     automaticamente substituir� qualquer ponto nos nomes de vari�veis recebidas com
+     sublinhados.
     </para>
 
    </sect2>
 
    <sect2 id="language.variables.determining-type-of">
-    <title>Determining variable types</title>
+    <title>Determinando o tipo das vari�veis</title>
 
     <para>
-     Because PHP determines the types of variables and converts them
-     (generally) as needed, it is not always obvious what type a given
-     variable is at any one time.  PHP includes several functions
-     which find out what type a variable is. They are
-     <function>gettype</function>, <function>is_long</function>,
-     <function>is_double</function>, <function>is_string</function>,
-     <function>is_array</function>, and
-     <function>is_object</function>.
+     Porque o PHP determina os tipos de vari�veis e faz convers�es
+     (geralmente) quando necess�rias, nem sempre � �bvio o tipo de uma vari�vel
+     tem em todos os momentos. O PHP inclu� v�rias fun��es
+     que permitem determinar qual o tipo de uma vari�vel. Elas s�o
+     <function>gettype</function>, <function>is_array</function>,
+     <function>is_float</function>, <function>is_int</function>,
+     <function>is_object</function>, e
+     <function>is_string</function>.
     </para>
    </sect2>
 
@@ -1025,20 +780,23 @@
      
  </chapter>
  
- <!-- Keep this comment at the end of the file
- Local variables:
- mode: sgml
- sgml-omittag:t
- sgml-shorttag:t
- sgml-minimize-attributes:nil
- sgml-always-quote-attributes:t
- sgml-indent-step:1
- sgml-indent-data:t
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
 indent-tabs-mode:nil
- sgml-parent-document:nil
- sgml-default-dtd-file:"../../manual.ced"
- sgml-exposed-tags:nil
- sgml-local-catalogs:nil
- sgml-local-ecat-files:nil
- End:
- -->
+sgml-parent-document:nil
+sgml-default-dtd-file:"../../manual.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+vim600: syn=xml fen fdm=syntax fdl=2 si
+vim: et tw=78 syn=sgml
+vi: ts=1 sw=1
+-->
Index: phpdoc-pt_BR/translation.xml
diff -u phpdoc-pt_BR/translation.xml:1.12 phpdoc-pt_BR/translation.xml:1.13
--- phpdoc-pt_BR/translation.xml:1.12   Mon May 13 22:41:13 2002
+++ phpdoc-pt_BR/translation.xml        Sun May 19 22:34:33 2002
@@ -7,7 +7,7 @@
  </intro>
        <translators>
                <person name="Renato Arruda" email="[EMAIL PROTECTED]" 
nick="rarruda" cvs="yes"/>
-               <person name="Andr� L F S Bacci" email="[EMAIL PROTECTED]" 
nick="andre_ae" cvs="yes"/>
+               <person name="Andr� L F S Bacci" email="[EMAIL PROTECTED]" nick="ae" 
+cvs="yes"/>
                <person name="Anderson Fortaleza" cvs="yes" email="[EMAIL PROTECTED]" 
nick="phaser" cvs="yes"/>
                <person name="Jo�o Prado Maia" email="[EMAIL PROTECTED]" nick="jpm" 
cvs="yes"/>
                <person name="Claudio Pereira" email="[EMAIL PROTECTED]" 
nick="cpereira" cvs="yes"/>
@@ -18,9 +18,8 @@
                <file name="chapters/config.xml" person="rarruda" type="review" 
date="04.27.2002"/>
                <file name="reference/mysql/reference.xml" person="rarruda" 
type="translation" date="04.18.2002"/>
                <file name="reference/math/functions/*" person="rarruda" 
type="translation" date="04.28.2002"/>
-               <file name="language/variables.xml" person="cpereira" 
type="translation" date=""/>
                <file name="reference/math/reference.xml" person="kappu" 
type="translation" date="02.02.2002"/>
                <file name="reference/pgsql/reference.xml" person="phaser" 
type="translation" date="04.26.2002"/>
-               <file name="language/*" person="andre_ae" type="review (1 of 9)" 
date="05.12.2002"/>
+               <file name="language/*" person="ae" type="review (3 of 10)" 
+date="05.12.2002"/>
        </work-in-progress>
 </translation>


Reply via email to