Results of 1 - 10 of about 13 for QuickHashIntSet (0.003 sec.)
- QuickHashIntSet::__construct — Creates a new QuickHashIntSet object | PHP 8.3 12123
- QuickHashIntSet::__construct (PECL quickhash >= Unknown) QuickHashIntSet::__construct — Creates a new QuickHashIntSet object 説明 public function QuickHashIntSet::__construct ( int $size , int $options = ? ) This constructor creates a new QuickHashIntSet
... the next power of two. It is also automatically limited from 4 to 4194304 . options The options that you can pass in are: QuickHashIntSet::CHECK_FOR_DUPES , which makes sure no duplicate entries are added to the set; QuickHashIntSet::DO_NOT_USE_ZEND_ALLOC to n ... ot use PHP's internal memory manager as well as one of QuickHashIntSet::HASHER_NO_HASH , QuickHashIntSet::HASHER_JENKINS1 or QuickHashIntSet::HASHER_JENKINS2 . These last three configure which ... hashing algorithm to use. All options can be combined using bitmasks. 戻り値 Returns a new QuickHashIntSet object. 例 例1 QuickHashIntSet::__construct() example <?php var_dump ( new QuickHashIntSet ( 1024 ) ); var_dump ( new Quic ...
-
https://man.mtool.work/php/8.3/quickhashintset.construct.html
- The QuickHashIntSet class | PHP 8.3 11877
- The QuickHashIntSet class (PECL quickhash >= Unknown) はじめに This class wraps around a set containing integer numbers. Sets can also be iterated over with foreach as the Iterator interface is implemented as well. The order of which elemen
... ts are returned in is not guaranteed. クラス概要 class QuickHashIntSet { /* 定数 */ const int CHECK_FOR_DUPES = 1 ; const int DO_NOT_USE_ZEND_ALLOC = 2 ; const int HASHER_NO_HASH = 256 ; const ... blic function getSize (): int public static function loadFromFile ( string $filename , int $size = ? , int $options = ? ): QuickHashIntSet public static function loadFromString ( string $contents , int $size = ? , int $options = ? ): QuickHashIntSet public func ... tion saveToFile ( string $filename ): void public function saveToString (): string } 定義済み定数 QuickHashIntSet::CHECK_FOR_DUPES If enabled, adding duplicate elements to a set (through either QuickHashIntSet::add() or QuickHashIntSet: ...
-
https://man.mtool.work/php/8.3/class.quickhashintset.html
- Quickhash | PHP 8.3 9800
- Quickhash はじめに The quickhash extension contains a set of specific strongly-typed classes to deal with specific set and hash implementations. インストール/設定 要件 インストール手順 例 QuickHashIntSet — The QuickHashIntSet class QuickHashIntSet
... hIntSet::add — This method adds a new entry to the set QuickHashIntSet::__construct — Creates a new QuickHashIntSet object QuickHashIntSet::delete — This method deletes an entry from the set Qu ... ickHashIntSet::exists — This method checks whether a key is part of the set QuickHashIntSet::getSize — Returns the number of elements in the set QuickHashIntSet::loadFromFile — This factory method creates a set fro ... m a file QuickHashIntSet::loadFromString — This factory method creates a set from a string QuickHashIntSet::saveToFile — This method stores an in-m ...
-
https://man.mtool.work/php/8.3/book.quickhash.html
- QuickHashIntSet::add — This method adds a new entry to the set | PHP 8.3 9413
- QuickHashIntSet::add (PECL quickhash >= Unknown) QuickHashIntSet::add — This method adds a new entry to the set 説明 public function QuickHashIntSet::add ( int $key ): bool This method adds a new entry to the set, and returns whether the en
... try was added. Entries are by default always added unless QuickHashIntSet::CHECK_FOR_DUPES has been passed when the set was created. パラメータ key The key of the entry to add. 戻り値 true when th ... e entry was added, and false if the entry was not added. 例 例1 QuickHashIntSet::add() example <?php echo "without dupe checking\n" ; $set = new QuickHashIntSet ( 1024 ); var_dump ( $set -> exists ( 4 ) ... add ( 4 ) ); var_dump ( $set -> exists ( 4 ) ); var_dump ( $set -> add ( 4 ) ); echo "\nwith dupe checking\n" ; $set = new QuickHashIntSet ( 1024 , QuickHashIntSet :: CHECK_FOR_DUPES ); var_dump ( $set -> exists ( 4 ) ); var_dump ( $set -> add ( 4 ) ); var_dump ...
-
https://man.mtool.work/php/8.3/quickhashintset.add.html
- QuickHashIntSet::loadFromFile — This factory method creates a set from a file |... 8832
- QuickHashIntSet::loadFromFile (PECL quickhash >= Unknown) QuickHashIntSet::loadFromFile — This factory method creates a set from a file 説明 public static function QuickHashIntSet::loadFromFile ( string $filename , int $size = ? , int $opti
... ons = ? ): QuickHashIntSet This factory method creates a new set from a definition file on disk. The file format consists of 32 bit signed integers p ... umber of entries in the set, rounded up to the nearest power of two with a maximum limit of 4194304 . 戻り値 Returns a new QuickHashIntSet . 例 例1 QuickHashIntSet::loadFromFile() example <?php $file = dirname ( __FILE__ ) . "/simple.set" ; $set = QuickHashIntS ... et :: loadFromFile ( $file , QuickHashIntSet :: DO_NOT_USE_ZEND_ALLOC ); foreach( range ( 0 , 0x0f ) as $key ) { printf ( "Key %3d (%2x) is %s\n" , $key , $key , $set ...
-
https://man.mtool.work/php/8.3/quickhashintset.loadfromfile.html
- QuickHashIntSet::loadFromString — This factory method creates a set from a stri... 8832
- QuickHashIntSet::loadFromString (PECL quickhash >= Unknown) QuickHashIntSet::loadFromString — This factory method creates a set from a string 説明 public static function QuickHashIntSet::loadFromString ( string $contents , int $size = ? , i
... nt $options = ? ): QuickHashIntSet This factory method creates a new set from a definition in a string. The file format consists of 32 bit signed integers pa ... entries in the set, rounded up to the nearest power of two automatically limited from 64 to 4194304 . 戻り値 Returns a new QuickHashIntSet . 例 例1 QuickHashIntSet::loadFromString() example <?php $contents = file_get_contents ( dirname ( __FILE__ ) . "/simple.s ... et" ); $set = QuickHashIntSet :: loadFromString ( $contents , QuickHashIntSet :: DO_NOT_USE_ZEND_ALLOC ); foreach( range ( 0 , 0x0f ) as $key ) { printf ...
-
https://man.mtool.work/php/8.3/quickhashintset.loadfromstring.html
- QuickHashIntSet::saveToString — This method returns a serialized version of the... 8832
- QuickHashIntSet::saveToString (PECL quickhash >= Unknown) QuickHashIntSet::saveToString — This method returns a serialized version of the set 説明 public function QuickHashIntSet::saveToString (): string This method returns a serialized ver
... sion of the set in the same format that QuickHashIntSet::loadFromString() can read. パラメータ この関数にはパラメータはありません。 戻り値 This method returns a string containing ... ized format of the set. Each element is stored as a four byte value in the Endianness that the current system uses. 例 例1 QuickHashIntSet::saveToString() example <?php $set = new QuickHashIntSet ( 1024 ); var_dump ( $set -> exists ( 4 ) ); var_dump ( $set -> a ...
-
https://man.mtool.work/php/8.3/quickhashintset.savetostring.html
- QuickHashIntSet::saveToFile — This method stores an in-memory set to disk | PHP... 8780
- QuickHashIntSet::saveToFile (PECL quickhash >= Unknown) QuickHashIntSet::saveToFile — This method stores an in-memory set to disk 説明 public function QuickHashIntSet::saveToFile ( string $filename ): void This method stores an existing set
... to a file on disk, in the same format that QuickHashIntSet::loadFromFile() can read. パラメータ filename The filename of the file to store the hash in. 戻り値 値を返しません。 例 例 ... 1 QuickHashIntSet::saveToFile() example <?php $set = new QuickHashIntSet ( 1024 ); var_dump ( $set -> exists ( 4 ) ); var_dump ( $set -> add ...
-
https://man.mtool.work/php/8.3/quickhashintset.savetofile.html
- QuickHashIntSet::getSize — Returns the number of elements in the set | PHP 8.3 8199
- QuickHashIntSet::getSize (PECL quickhash >= Unknown) QuickHashIntSet::getSize — Returns the number of elements in the set 説明 public function QuickHashIntSet::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 ) ); ...
-
https://man.mtool.work/php/8.3/quickhashintset.getsize.html
- QuickHashIntSet::delete — This method deletes an entry from the set | PHP 8.3 7918
- QuickHashIntSet::delete (PECL quickhash >= Unknown) QuickHashIntSet::delete — This method deletes an entry from the set 説明 public function QuickHashIntSet::delete ( int $key ): bool This method deletes an entry from the set, and returns w
... key The key of the entry to delete. 戻り値 true when the entry was deleted, and false if the entry was not deleted. 例 例1 QuickHashIntSet::delete() example <?php $set = new QuickHashIntSet ( 1024 ); var_dump ( $set -> exists ( 4 ) ); var_dump ( $set -> add ( 4 ...
-
https://man.mtool.work/php/8.3/quickhashintset.delete.html