Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 3232

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>Clear bit</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.gmp-and.html">gmp_and</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.gmp-cmp.html">gmp_cmp</a></div>
 <div class="up"><a href="ref.gmp.html">GMP Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.gmp-clrbit" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">gmp_clrbit</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.4, PHP 5)</p><p class="refpurpose"><span class="refname">gmp_clrbit</span> &mdash; <span class="dc-title">Clear bit</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.gmp-clrbit-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>gmp_clrbit</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$a</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$index</code></span>
   )</div>

  <p class="para rdfs-comment">
   Clears (sets to 0) bit <em><code class="parameter">index</code></em> in
   <em><code class="parameter">a</code></em>. The index starts at 0.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.gmp-clrbit-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">a</code></em></span>
     <dd>

      <p class="para">It can be either a GMP number <span class="type"><a href="language.types.resource.html" class="type resource">resource</a></span>, or a
numeric string given that it is possible to convert the latter to a number.</p> 
     </dd>

    </dt>

    <dt>

     <span class="term"><em><code class="parameter">index</code></em></span>
     <dd>

      <p class="para">
       The index of the bit to clear.  Index 0 represents the least significant bit.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.gmp-clrbit-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   A GMP number <span class="type"><a href="language.types.resource.html" class="type resource">resource</a></span>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.gmp-clrbit-examples">
  <h3 class="title">Examples</h3>
  <div class="example" id="example-3402">
   <p><strong>Example #1  <span class="function"><strong>gmp_clrbit()</strong></span> example</strong></p>
   <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">gmp_init</span><span style="color: #007700">(</span><span style="color: #DD0000">"0xff"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">gmp_clrbit</span><span style="color: #007700">(</span><span style="color: #0000BB">$a</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);&nbsp;</span><span style="color: #FF8000">//&nbsp;index&nbsp;starts&nbsp;at&nbsp;0,&nbsp;least&nbsp;significant&nbsp;bit<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #0000BB">gmp_strval</span><span style="color: #007700">(</span><span style="color: #0000BB">$a</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

   <div class="example-contents"><p>The above example will output:</p></div>
   <div class="example-contents screen">
<div class="cdata"><pre>
254
</pre></div>
   </div>
  </div>
 </div>


 <div class="refsect1 notes" id="refsect1-function.gmp-clrbit-notes">
  <h3 class="title">Notes</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    Unlike most of the other GMP functions,  <span class="function"><strong>gmp_clrbit()</strong></span>
    must be called with a GMP resource that already exists (using
     <span class="function"><a href="function.gmp-init.html" class="function">gmp_init()</a></span> for example). One will not be
    automatically created.
   </p>
  </p></blockquote>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.gmp-clrbit-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.gmp-setbit.html" class="function" rel="rdfs-seeAlso">gmp_setbit()</a> - Set bit</span></li>
    <li class="member"> <span class="function"><a href="function.gmp-testbit.html" class="function" rel="rdfs-seeAlso">gmp_testbit()</a> - Tests if a bit is set</span></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.gmp-and.html">gmp_and</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.gmp-cmp.html">gmp_cmp</a></div>
 <div class="up"><a href="ref.gmp.html">GMP Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>