<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/reserved.interfaces.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'class.countable.php',
    1 => 'Countable',
    2 => 'Countable 接口',
  ),
  'up' => 
  array (
    0 => 'reserved.interfaces.php',
    1 => '预定义接口和类',
  ),
  'prev' => 
  array (
    0 => 'throwable.tostring.php',
    1 => 'Throwable::__toString',
  ),
  'next' => 
  array (
    0 => 'countable.count.php',
    1 => 'Countable::count',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'language/predefined/countable.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.countable.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.countable" class="reference">

 <h1 class="title">Countable 接口</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.1.0, PHP 7, PHP 8)</p>


  <div class="section" id="countable.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    类实现 <span class="classname"><strong class="classname">Countable</strong></span> 可被用于
    <span class="function"><a href="function.count.php" class="function">count()</a></span> 函数.
   </p>
  </div>


  <div class="section" id="countable.synopsis">
   <h2 class="title">接口摘要</h2>


   <div class="classsynopsis"><div class="classsynopsisinfo">
    
     <span class="modifier">interface</span> <strong class="interfacename"><strong class="interfacename">Countable</strong></strong> {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="countable.count.php" class="methodname">count</a></span>(): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

   }</div>


  </div>

 </div>

 








<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="countable.count.php">Countable::count</a> — 统计对象的元素个数</li></ul>
</div>
<?php manual_footer($setup); ?>