QuickHashStringIntHash::delete

(No version information available, might only be in Git)

QuickHashStringIntHash::deleteThis method deletes an entry from the hash

Description

public QuickHashStringIntHash::delete(string $key): bool

This method deletes an entry from the hash, and returns whether the entry was deleted or not. Associated memory structures will not be freed immediately, but rather when the hash itself is freed.

Elements can not be deleted when the hash is used in an iterator. The method will not throw an exception, but simply return false like would happen with any other deletion failure.

Parameters

key

The key of the entry to delete.

Return Values

true when the entry was deleted, and false if the entry was not deleted.

Examples

Example #1 QuickHashStringIntHash::delete() example

<?php
$hash 
= new QuickHashStringIntHash1024 );
var_dump$hash->exists'four' ) );
var_dump$hash->add'four') );
var_dump$hash->get'four' ) );
var_dump$hash->delete'four' ) );
var_dump$hash->exists'four' ) );
var_dump$hash->get'four' ) );
var_dump$hash->delete'four' ) );
?>

The above example will output something similar to:

bool(false)
bool(true)
int(5)
bool(true)
bool(false)
bool(false)
bool(false)

Here you can write a comment


Please enter at least 10 characters.
Loading... Please wait.
* Pflichtangabe
There are no comments available yet.

Midjourney Tutorial - Instructions for beginners

There is an informative video about Midjourney, the tool for creating digital images using artificial intelligence, entitled "Midjourney tutorial in German - instructions for beginners" ...

Mike94

Autor : Mike94
Category: KI Tutorials

Basics of views in MySQL

Views in a MySQL database offer the option of creating a virtual table based on the result of an SQL query. This virtual table can be queried like a normal table without changing the underlying data. ...

admin

Autor : admin
Category: mySQL-Tutorials

Definition of stored procedures - an introduction

Stored procedures are predefined SQL code blocks that are stored in a database and can be called up as required. ...

Bernie

Autor : ebiz-consult GmbH & Co. KG
Category: mySQL-Tutorials

Publish a tutorial

Share your knowledge with other developers worldwide

Share your knowledge with other developers worldwide

You are a professional in your field and want to share your knowledge, then sign up now and share it with our PHP community

learn more

Publish a tutorial