QuickHashIntStringHash::update

(PECL quickhash >= Unknown)

QuickHashIntStringHash::updateThis method updates an entry in the hash with a new value

Beschreibung

public QuickHashIntStringHash::update(int $key, string $value): bool

This method updates an entry with a new value, and returns whether the entry was update. If there are duplicate keys, only the first found element will get an updated value. Use QuickHashIntStringHash::CHECK_FOR_DUPES during hash creation to prevent duplicate keys from being part of the hash.

Parameter-Liste

key

The key of the entry to update.

value

The new value for the entry. If a non-string is passed, it will be converted to a string automatically if possible.

Rückgabewerte

true when the entry was found and updated, and false if the entry was not part of the hash already.

Beispiele

Beispiel #1 QuickHashIntStringHash::update() example

<?php
$hash
->add161803398"--" );
$hash->add314159265"a lot" );

echo 
$hash->get161803398 ), "\n";
echo 
$hash->get314159265 ), "\n";

var_dump$hash->update314159265"a lot plus one" ) );
var_dump$hash->update314159999"a lot plus one" ) );

echo 
$hash->get161803398 ), "\n";
echo 
$hash->get314159265 ), "\n";
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

--
a lot
bool(true)
bool(false)
--
a lot plus one

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

WhatsApp: +16465806302 – Erhalten Sie Abschlüsse und Zertifikate

WhatsApp: +16465806302 – Erhalten Sie Abschlüsse und Zertifikate ohne Prüfungen und erzielen Sie beste Ergebnisse. Bestellen Sie verifizierba ...

Geschrieben von karlmaxis am 16.09.2026 11:19:31
Forum: Archiv / Trash
+16465806302, Registrierten Führerschein kaufen. NEBOSH. Einbürgerungsurkunden,

WhatsApp +16465806302, Registrierten Führerschein kaufen. NEBOSH. darkwebdocuments.net. Einbürgerungsurkunden, ASP, CSP. Wir sind darauf spezia ...

Geschrieben von karlmaxis am 16.09.2026 11:17:41
Forum: Off-Topic Diskussionen
The Reaction Time Challenge

Human Benchmark (https://human-benchmark.org) also offers a Typing Test that measures typing speed and accuracy. Users type displayed text as quic ...

Geschrieben von nohasm191 am 16.09.2026 09:34:58
Forum: PHP Developer Forum
33winca

"Fun Facts Nows Discover Something Amazing Every Day Welcome to Fun Facts (https://www.youtube.com/@Funfacts-s5g) Nows, a place for curious minds ...

Geschrieben von Funfactss5g am 16.09.2026 08:54:22
Forum: Provider / Domains