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

Wer kennt ein flexibles CMS?

поли (http://audiobookkeeper.ru/book/1724)398 (http://cottagenet.ru/plan/512)обра (http://eyesvision.ru/lectures/327)Bett (http://eyesvisi ...

Geschrieben von ymah am 19.01.2026 01:43:07
Forum: Apps und PHP Script Gesuche
ausgabe von formulareinträgen ohne modifikation der php datei

Фран (http://audiobookkeeper.ru/book/1723)397.1 (http://cottagenet.ru/plan/511)напр (http://eyesvision.ru/lectures/326)MONT (http://eyesvi ...

Geschrieben von ymah am 19.01.2026 01:41:52
Forum: Apps und PHP Script Gesuche
Kurs Reservationssystem

плем (http://audiobookkeeper.ru/book/1722)395.4 (http://cottagenet.ru/plan/510)свеч (http://eyesvision.ru/lectures/325)MONT (http://eyesvi ...

Geschrieben von ymah am 19.01.2026 01:40:37
Forum: Apps und PHP Script Gesuche
[Script] Formular mit mehreren Empfängern?

един (http://audiobookkeeper.ru/book/1721)395 (http://cottagenet.ru/plan/509)помо (http://eyesvision.ru/lectures/324)Bett (http://eyesvisi ...

Geschrieben von ymah am 19.01.2026 01:39:21
Forum: Apps und PHP Script Gesuche