QuickHashIntStringHash::loadFromString

(PECL quickhash >= Unknown)

QuickHashIntStringHash::loadFromStringThis factory method creates a hash from a string

Beschreibung

public static QuickHashIntStringHash::loadFromString(string $contents, int $size = 0, int $options = 0): QuickHashIntStringHash

This factory method creates a new hash from a definition in a string. The format is the same as the one used in "loadFromFile".

Parameter-Liste

contents

The string containing a serialized format of the hash.

size

The amount of bucket lists to configure. The number you pass in will be automatically rounded up to the next power of two. It is also automatically limited from 4 to 4194304.

options

The same options that the class' constructor takes; except that the size option is ignored. It is automatically calculated to be the same as the number of entries in the hash, rounded up to the nearest power of two with a maximum limit of 4194304.

Rückgabewerte

Returns a new QuickHashIntStringHash.

Beispiele

Beispiel #1 QuickHashIntStringHash::loadFromString() example

<?php
$contents 
file_get_contentsdirname__FILE__ ) . "/simple.hash" );
$hash QuickHashIntStringHash::loadFromString(
    
$contents,
    
QuickHashIntStringHash::DO_NOT_USE_ZEND_ALLOC
);
foreach( 
range00x0f ) as $key )
{
    
printf"Key %3d (%2x) is %s\n",
        
$key$key,
        
$hash->exists$key ) ? 'set' 'unset'
    
);
}
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

Key   0 ( 0) is unset
Key   1 ( 1) is set
Key   2 ( 2) is set
Key   3 ( 3) is set
Key   4 ( 4) is unset
Key   5 ( 5) is set
Key   6 ( 6) is unset
Key   7 ( 7) is set
Key   8 ( 8) is unset
Key   9 ( 9) is unset
Key  10 ( a) is unset
Key  11 ( b) is set
Key  12 ( c) is unset
Key  13 ( d) is set
Key  14 ( e) is unset
Key  15 ( f) is unset

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

FULLLZ.ASIA ⭐️ We Are Selling Verified Paypal And CashApp Acc.Paypal

TRACK 1&2 WITH PIN CASHAPP/PAYPAL TRANSFER N/SIN with Sortcode AccNumber CCV2 FULLLZ.ASIA ⭐️ Flip And Sells PAYPAL CASHAPP Dumps With Pin Trac ...

Geschrieben von dumpstop10 am 15.05.2026 17:27:44
Forum: Existenzgründer, Freelancing, Verträge und sonstiges
FULLLZ.ASIA ⭐️ Sell Info Fullz Social Security Number & DOB & Mother

TRACK 1&2 WITH PIN CASHAPP/PAYPAL TRANSFER N/SIN with Sortcode AccNumber CCV2 FULLLZ.ASIA ⭐️ Flip And Sells PAYPAL CASHAPP Dumps With Pin Trac ...

Geschrieben von dumpstop10 am 15.05.2026 17:06:47
Forum: Projekthilfe
FULLLZ.ASIA ⭐️ Dumps With Track1-track2 ATM UK US Fresh INFO

TRACK 1&2 WITH PIN CASHAPP/PAYPAL TRANSFER N/SIN with Sortcode AccNumber CCV2 FULLLZ.ASIA ⭐️ Flip And Sells PAYPAL CASHAPP Dumps With Pin Trac ...

Geschrieben von dumpstop10 am 15.05.2026 17:02:18
Forum: Windows (Client/Server)
FULLLZ.ASIA ⭐️ Verified Sellers/Carders Paypal Transfer Cashapp Western

TRACK 1&2 WITH PIN CASHAPP/PAYPAL TRANSFER N/SIN with Sortcode AccNumber CCV2 FULLLZ.ASIA ⭐️ Flip And Sells PAYPAL CASHAPP Dumps With Pin Trac ...

Geschrieben von dumpstop10 am 15.05.2026 16:59:24
Forum: IT-Security