<!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>Returns the number of elements in the hash</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="quickhashinthash.get.html">QuickHashIntHash::get</a></div> <div class="next" style="text-align: right; float: right;"><a href="quickhashinthash.loadfromfile.html">QuickHashIntHash::loadFromFile</a></div> <div class="up"><a href="class.quickhashinthash.html">QuickHashIntHash</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="quickhashinthash.getsize" class="refentry"> <div class="refnamediv"> <h1 class="refname">QuickHashIntHash::getSize</h1> <p class="verinfo">(PECL quickhash >= Unknown)</p><p class="refpurpose"><span class="refname">QuickHashIntHash::getSize</span> — <span class="dc-title">Returns the number of elements in the hash</span></p> </div> <div class="refsect1 description" id="refsect1-quickhashinthash.getsize-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">int</span> <span class="methodname"><strong>QuickHashIntHash::getSize</strong></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment"> Returns the number of elements in the hash. </p> </div> <div class="refsect1 parameters" id="refsect1-quickhashinthash.getsize-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <code class="parameter">key</code></dt> <dd> <p class="para"> The key of the entry to add. </p> </dd> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-quickhashinthash.getsize-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> The number of elements in the hash. </p> </div> <div class="refsect1 examples" id="refsect1-quickhashinthash.getsize-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-6358"> <p><strong>Example #1 <span class="function"><strong>QuickHashIntHash::getSize()</strong></span> example</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />$hash </span><span style="color: #007700">= new </span><span style="color: #0000BB">QuickHashIntHash</span><span style="color: #007700">( </span><span style="color: #0000BB">8 </span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$hash</span><span style="color: #007700">-></span><span style="color: #0000BB">add</span><span style="color: #007700">( </span><span style="color: #0000BB">2 </span><span style="color: #007700">) );<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$hash</span><span style="color: #007700">-></span><span style="color: #0000BB">add</span><span style="color: #007700">( </span><span style="color: #0000BB">3</span><span style="color: #007700">, </span><span style="color: #0000BB">5 </span><span style="color: #007700">) );<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">( </span><span style="color: #0000BB">$hash</span><span style="color: #007700">-></span><span style="color: #0000BB">getSize</span><span style="color: #007700">() );<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents screen"> <div class="cdata"><pre> bool(true) bool(true) int(2) </pre></div> </div> </div> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="quickhashinthash.get.html">QuickHashIntHash::get</a></div> <div class="next" style="text-align: right; float: right;"><a href="quickhashinthash.loadfromfile.html">QuickHashIntHash::loadFromFile</a></div> <div class="up"><a href="class.quickhashinthash.html">QuickHashIntHash</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>