cvs: phpdoc /en/language/predefined/variables superglobals.xml

From: Date: Sun, 20 Apr 2008 06:48:12 +0000
Subject: cvs: phpdoc /en/language/predefined/variables superglobals.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-1542@lists.php.net to get a copy of this message
philip Sun Apr 20 06:48:12 2008 UTC Added files: /phpdoc/en/language/predefined/variables superglobals.xml Log: Created new superglobals page. Also, superglobal content from ../variables.xml was folded into this page. http://cvs.php.net/viewvc.cgi/phpdoc/en/language/predefined/variables/superglobals.xml?view=markup&rev=1.1 Index: phpdoc/en/language/predefined/variables/superglobals.xml +++ phpdoc/en/language/predefined/variables/superglobals.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <refentry xml:id="language.variables.superglobals" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> <refname>Superglobals</refname> <refpurpose>Superglobals are built-in variables that are always available in all scopes</refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <para> Several predefined variables in PHP are "superglobals", which means they are available in all scopes throughout a script. There is no need to do <command>global $variable;</command> to access them within functions or methods. </para> <para> These superglobal variables are: <simplelist> <member><link linkend="reserved.variables.globals">$GLOBALS</link></member> <member><link linkend="reserved.variables.server">$_SERVER</link></member> <member><link linkend="reserved.variables.get">$_GET</link></member> <member><link linkend="reserved.variables.post">$_POST</link></member> <member><link linkend="reserved.variables.files">$_FILES</link></member> <member><link linkend="reserved.variables.cookies">$_COOKIE</link></member> <member><link linkend="reserved.variables.session">$_SESSION</link></member> <member><link linkend="reserved.variables.request">$_REQUEST</link></member> <member><link linkend="reserved.variables.environment">$_ENV</link></member> </simplelist> </para> </refsect1> <refsect1 role="changelog"> &reftitle.changelog; <para> <informaltable> <tgroup cols="2"> <thead> <row> <entry>&Version;</entry> <entry>&Description;</entry> </row> </thead> <tbody> <row> <entry>4.1.0</entry> <entry> Superglobals were introduced to PHP. </entry> </row> </tbody> </tgroup> </informaltable> </para> </refsect1> <refsect1 role="notes"> &reftitle.notes; <note> <title>Variable availability</title> <para> By default, all of the superglobals are available but there are directives that affect this availability. For further information, refer to the documentation for <link linkend="ini.variables-order">variables_order</link>. </para> </note> <note> <title>Dealing with register_globals</title> <para> If the deprecated <link linkend="ini.register-globals">register_globals</link> directive is set to <literal>on</literal> then the variables within will also be made available in the global scope of the script. For example, <varname>$_POST['foo']</varname> would also exist as <varname>$foo</varname>. </para> <para> For related information, see the FAQ titled "<link linkend="faq.register-globals">How does register_globals affect me?</link>" </para> </note> <note> <title>Variable variables</title> <para> Superglobals cannot be used as <link linkend="language.variables.variable">variable variables</link> inside functions or class methods. </para> </note> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><link linkend="language.variables.scope">variable scope</link></member> <member>The <link linkend="ini.variables-order">variables_order</link> directive</member> <member><link linkend="book.filter">The filter extension</link></member> </simplelist> </para> </refsect1> </refentry> <!-- 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: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->

« previous php.doc.cvs (#1542) next »