• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • QuickHashIntStringHash::getSize()

    (PECL quickhash >= Unknown)

    Returns the number of elements in the hash

    说明

    publicQuickHashIntStringHash::getSize(void): int

    Returns the number of elements in the hash.

    返回值

    The number of elements in the hash.

    范例

    Example #1 QuickHashIntStringHash::getSize() example

    <?php
    $hash = new QuickHashIntStringHash( 8 );
    var_dump( $hash->add( 2, "two" ) );
    var_dump( $hash->add( 3, 5 ) );
    var_dump( $hash->getSize() );
    ?>
    

    以上例程的输出类似于:

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