php8.5
Home/ Manual/ quickhash / quickhashintset/ QuickHashIntSet::getSize

QuickHashIntSet::getSize

PHP function Edit on GitHub ✎

(PECL quickhash >= Unknown)

Returns the number of elements in the set

Description

QuickHashIntSet::getSize(): int

Returns the number of elements in the set.

Parameters Parameters

Return Values

The number of elements in the set.

Examples

QuickHashIntSet::getSize() example

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

The above example will output something similar to:

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

Source: reference/quickhash/quickhashintset/getsize.xml · from the official PHP manual (php/doc-en)