<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc'; $TOC = array(); $TOC_DEPRECATED = array(); $PARENTS = array(); include_once dirname(__FILE__) ."/toc/class.quickhashinthash.inc"; $setup = array ( 'home' => array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'quickhashinthash.getsize.php', 1 => 'QuickHashIntHash::getSize', 2 => 'Returns the number of elements in the hash', ), 'up' => array ( 0 => 'class.quickhashinthash.php', 1 => 'QuickHashIntHash', ), 'prev' => array ( 0 => 'quickhashinthash.get.php', 1 => 'QuickHashIntHash::get', ), 'next' => array ( 0 => 'quickhashinthash.loadfromfile.php', 1 => 'QuickHashIntHash::loadFromFile', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/quickhash/quickhashinthash/getsize.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?> <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">说明</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="methodname"><strong>QuickHashIntHash::getSize</strong></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></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">参数</h3> <p class="para">此函数没有参数。</p> </div> <div class="refsect1 returnvalues" id="refsect1-quickhashinthash.getsize-returnvalues"> <h3 class="title">返回值</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">示例</h3> <p class="para"> <div class="example" id="example-5404"> <p><strong>示例 #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>以上示例的输出类似于:</p></div> <div class="example-contents screen"> <div class="examplescode"><pre class="examplescode">bool(true) bool(true) int(2)</pre> </div> </div> </div> </p> </div> </div><?php manual_footer($setup); ?>