<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/language.references.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'language.references.spot.php',
    1 => 'Spotting References',
    2 => 'Spotting References',
  ),
  'up' => 
  array (
    0 => 'language.references.php',
    1 => 'References Explained',
  ),
  'prev' => 
  array (
    0 => 'language.references.unset.php',
    1 => 'Unsetting References',
  ),
  'next' => 
  array (
    0 => 'reserved.variables.php',
    1 => 'Попередньо визначені змінні',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'language/references.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="language.references.spot" class="sect1">
   <h2 class="title">Spotting References</h2>
   <p class="simpara">
    Many syntax constructs in PHP are implemented via referencing
    mechanisms, so everything mentioned herein about reference binding also
    applies to these constructs. Some constructs, like passing and
    returning by reference, are mentioned above. Other constructs that
    use references are:
   </p>

   <div class="sect2" id="references.global">
    <h3 class="title">global References</h3>
    <p class="para">
     When you declare a variable as <strong class="command">global $var</strong> you
     are in fact creating reference to a global variable. That means,
     this is the same as:
     <div class="informalexample">
      <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />$var </span><span style="color: #007700">=&amp; </span><span style="color: #0000BB">$GLOBALS</span><span style="color: #007700">[</span><span style="color: #DD0000">"var"</span><span style="color: #007700">];<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
      </div>

     </div>
    </p>
    <p class="simpara">
     This also means that unsetting <var class="varname">$var</var>
     won&#039;t unset the global variable.
    </p>
   </div>
  </div><?php manual_footer($setup); ?>