Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 8955

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Unsetting References</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="language.references.return.html">Returning References</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="language.references.spot.html">Spotting References</a></div>
 <div class="up"><a href="language.references.html">References Explained</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="language.references.unset" class="sect1">
   <h2 class="title">Unsetting References</h2>
   <p class="para">
    When you unset the reference, you just break the binding between
    variable name and variable content. This does not mean that
    variable content will be destroyed. For example:
    <div class="informalexample">
     <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$a&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$b&nbsp;</span><span style="color: #007700">=&amp;&nbsp;</span><span style="color: #0000BB">$a</span><span style="color: #007700">;<br />unset(</span><span style="color: #0000BB">$a</span><span style="color: #007700">);&nbsp;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
     </div>

    </div>
    won&#039;t unset <var class="varname"><var class="varname">$b</var></var>, just <var class="varname"><var class="varname">$a</var></var>. 
   </p>
   <p class="simpara">
    Again, it might be useful to think about this as analogous to the Unix
    <strong class="command">unlink</strong> call.
   </p>
  </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="language.references.return.html">Returning References</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="language.references.spot.html">Spotting References</a></div>
 <div class="up"><a href="language.references.html">References Explained</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>