array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'quickhashintset.getsize.php', 1 => 'QuickHashIntSet::getSize', 2 => 'Returns the number of elements in the set', ), 'up' => array ( 0 => 'class.quickhashintset.php', 1 => 'QuickHashIntSet', ), 'prev' => array ( 0 => 'quickhashintset.exists.php', 1 => 'QuickHashIntSet::exists', ), 'next' => array ( 0 => 'quickhashintset.loadfromfile.php', 1 => 'QuickHashIntSet::loadFromFile', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/quickhash/quickhashintset/getsize.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

QuickHashIntSet::getSize

(PECL quickhash >= Unknown)

QuickHashIntSet::getSizeReturns the number of elements in the set

説明

publicQuickHashIntSet::getSize(): int

Returns the number of elements in the set.

パラメータ

この関数にはパラメータはありません。

戻り値

The number of elements in the set.

例1 QuickHashIntSet::getSize() example

<?php
$set
= new QuickHashIntSet( 8 );
var_dump( $set->add( 2 ) );
var_dump( $set->add( 3 ) );
var_dump( $set->getSize() );
?>

上の例の出力は、 たとえば以下のようになります。

bool(true)
bool(true)
int(2)