« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 15 for QuickHashStringIntHash (0.003 sec.)
The QuickHashStringIntHash class | PHP 8.3 12051
The QuickHashStringIntHash class (No version information available, might only be in Git) はじめに This class wraps around a hash containing strings, where the values are integer numbers. Hashes are also available as implementation of the A ... Iterator interface is implemented as well. The order of which elements are returned in is not guaranteed. クラス概要 class QuickHashStringIntHash { /* 定数 */ const int CHECK_FOR_DUPES = 1 ; const int DO_NOT_USE_ZEND_ALLOC = 2 ; /* メソッド */ public function add ( st ... blic function getSize (): int public static function loadFromFile ( string $filename , int $size = 0 , int $options = 0 ): QuickHashStringIntHash public static function loadFromString ( string $contents , int $size = 0 , int $options = 0 ): QuickHashStringIntHash publ ... ic function set ( string $key , int $value ): int public function update ( string $key , int $value ): bool } 定義済み定数 QuickHashStringIntHash::CHECK_FOR_DUPES If enabled, adding duplicate elements to a set (through either QuickHashStringIntHash::add() or QuickHash ...
https://man.mtool.work/php/8.3/class.quickhashstringinthash.html
QuickHashStringIntHash::__construct — Creates a new QuickHashStringIntHash obje... 11581
QuickHashStringIntHash::__construct (No version information available, might only be in Git) QuickHashStringIntHash::__construct — Creates a new QuickHashStringIntHash object 説明 public function QuickHashStringIntHash::__construct ( int $s ... ize , int $options = 0 ) This constructor creates a new QuickHashStringIntHash . The size is the amount of bucket lists to create. The more lists there are, the less collisions you will have. Options a ... the next power of two. It is also automatically limited from 64 to 4194304 . options The options that you can pass in are: QuickHashStringIntHash::CHECK_FOR_DUPES , which makes sure no duplicate entries are added to the hash and QuickHashStringIntHash::DO_NOT_USE_ZEND ... _ALLOC to not use PHP's internal memory manager. 戻り値 Returns a new QuickHashStringIntHash object. 例 例1 QuickHashStringIntHash::__construct() example <?php var_dump ( new QuickHashStringIntHash ( 1024 ) ); var_d ...
https://man.mtool.work/php/8.3/quickhashstringinthash.construct.html
Quickhash | PHP 8.3 11111
Quickhash はじめに The quickhash extension contains a set of specific strongly-typed classes to deal with specific set and hash implementations. インストール/設定 要件 インストール手順 例 QuickHashIntSet — The QuickHashIntSet class QuickHas ... a new one if the entry doesn't exist QuickHashIntHash::update — This method updates an entry in the hash with a new value QuickHashStringIntHash — The QuickHashStringIntHash class QuickHashStringIntHash::add — This method adds a new entry to the hash QuickHashStringI ... ntHash::__construct — Creates a new QuickHashStringIntHash object QuickHashStringIntHash::delete — This method deletes an entry from the hash QuickHashStringIntHash::exists — This m ... ethod checks whether a key is part of the hash QuickHashStringIntHash::get — This method retrieves a value from the hash by its key QuickHashStringIntHash::getSize — Returns the number of elem ...
https://man.mtool.work/php/8.3/book.quickhash.html
QuickHashStringIntHash::add — This method adds a new entry to the hash | PHP 8.... 9752
QuickHashStringIntHash::add (No version information available, might only be in Git) QuickHashStringIntHash::add — This method adds a new entry to the hash 説明 public function QuickHashStringIntHash::add ( string $key , int $value ): bool ... s method adds a new entry to the hash, and returns whether the entry was added. Entries are by default always added unless QuickHashStringIntHash::CHECK_FOR_DUPES has been passed when the hash was created. パラメータ key The key of the entry to add. value The value of ... the entry to add. 戻り値 true when the entry was added, and false if the entry was not added. 例 例1 QuickHashStringIntHash::add() example <?php echo "without dupe checking\n" ; $hash = new QuickHashStringIntHash ( 1024 ); var_dump ( $hash ); var ... r_dump ( $hash -> get ( "four" ) ); var_dump ( $hash -> add ( "four" , 12 ) ); echo "\nwith dupe checking\n" ; $hash = new QuickHashStringIntHash ( 1024 , QuickHashStringIntHash :: CHECK_FOR_DUPES ); var_dump ( $hash ); var_dump ( $hash -> exists ( "four" ) ); var_dum ...
https://man.mtool.work/php/8.3/quickhashstringinthash.add.html
QuickHashStringIntHash::saveToString — This method returns a serialized version... 9543
QuickHashStringIntHash::saveToString (No version information available, might only be in Git) QuickHashStringIntHash::saveToString — This method returns a serialized version of the hash 説明 public function QuickHashStringIntHash::saveToStr ... ing (): string This method returns a serialized version of the hash in the same format that QuickHashStringIntHash::loadFromString() can read. パラメータ この関数にはパラメータはありません。 戻り値 This method returns a serialized format ... of an existing hash, in the same format that QuickHashStringIntHash::loadFromString() can read. 例 例1 QuickHashStringIntHash::saveToString() example <?php $hash = new QuickHashStringIntHash ...
https://man.mtool.work/php/8.3/quickhashstringinthash.savetostring.html
QuickHashStringIntHash::loadFromString — This factory method creates a hash fro... 9021
QuickHashStringIntHash::loadFromString (No version information available, might only be in Git) QuickHashStringIntHash::loadFromString — This factory method creates a hash from a string 説明 public static function QuickHashStringIntHash::lo ... adFromString ( string $contents , int $size = 0 , int $options = 0 ): QuickHashStringIntHash This factory method creates a new hash from a definition in a string. The format is the same as the one used in "loadFromF ... umber of entries in the hash, rounded up to the nearest power of two with a maximum limit of 4194304. 戻り値 Returns a new QuickHashStringIntHash. 例 例1 QuickHashStringIntHash::loadFromString() example <?php $contents = file_get_contents ( dirname ( __FILE__ ) . "/si ... mple.hash.string" ); $hash = QuickHashStringIntHash :: loadFromString ( $contents , QuickHashStringIntHash :: DO_NOT_USE_ZEND_ALLOC ); foreach( range ( 0 , 0x0f ) as $key ) { ...
https://man.mtool.work/php/8.3/quickhashstringinthash.loadfromstring.html
QuickHashStringIntHash::saveToFile — This method stores an in-memory hash to di... 8081
QuickHashStringIntHash::saveToFile (No version information available, might only be in Git) QuickHashStringIntHash::saveToFile — This method stores an in-memory hash to disk 説明 public function QuickHashStringIntHash::saveToFile ( string $ ... loadFromFile() can read. パラメータ filename The filename of the file to store the hash in. 戻り値 値を返しません。 例 例1 QuickHashStringIntHash::saveToFile() example <?php $hash = new QuickHashStringIntHash ( 1024 ); var_dump ( $hash -> add ( "forty three" , 42 ) ); ...
https://man.mtool.work/php/8.3/quickhashstringinthash.savetofile.html
QuickHashStringIntHash::getSize — Returns the number of elements in the hash | ... 8028
QuickHashStringIntHash::getSize (No version information available, might only be in Git) QuickHashStringIntHash::getSize — Returns the number of elements in the hash 説明 public function QuickHashStringIntHash::getSize (): int Returns the n ... of elements in the hash. パラメータ この関数にはパラメータはありません。 戻り値 The number of elements in the hash. 例 例1 QuickHashStringIntHash::getSize() example <?php $hash = new QuickHashStringIntHash ( 8 ); var_dump ( $hash -> add ( "two" , 2 ) ); var_dump ( $ha ...
https://man.mtool.work/php/8.3/quickhashstringinthash.getsize.html
QuickHashStringIntHash::get — This method retrieves a value from the hash by it... 7924
QuickHashStringIntHash::get (No version information available, might only be in Git) QuickHashStringIntHash::get — This method retrieves a value from the hash by its key 説明 public function QuickHashStringIntHash::get ( string $key ): mixe ... y The key of the entry to retrieve. 戻り値 The value if the key exists, or null if the key wasn't part of the hash. 例 例1 QuickHashStringIntHash::get() example <?php $hash = new QuickHashStringIntHash ( 8 ); var_dump ( $hash -> get ( "one" ) ); var_dump ( $hash -> ad ...
https://man.mtool.work/php/8.3/quickhashstringinthash.get.html
QuickHashStringIntHash::update — This method updates an entry in the hash with ... 7924
QuickHashStringIntHash::update (No version information available, might only be in Git) QuickHashStringIntHash::update — This method updates an entry in the hash with a new value 説明 public function QuickHashStringIntHash::update ( string ... rns whether the entry was update. If there are duplicate keys, only the first found element will get an updated value. Use QuickHashStringIntHash::CHECK_FOR_DUPES during hash creation to prevent duplicate keys from being part of the hash. パラメータ key The key of the ... ossible. 戻り値 true when the entry was found and updated, and false if the entry was not part of the hash already. 例 例1 QuickHashStringIntHash::update() example <?php $hash = new QuickHashStringIntHash ( 1024 ); $hash -> add ( 'six' , 314159265 ); $hash -> add ( "a ...
https://man.mtool.work/php/8.3/quickhashstringinthash.update.html
PREV 1 2 NEXT