PHP 8.4.6 Released!

QuickHashStringIntHash::get

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

QuickHashStringIntHash::getEste método recupera un valor del hash por su clave

Descripción

public QuickHashStringIntHash::get(string $key): mixed

Este método recupera un valor del hash por su clave.

Parámetros

key

La clave de la entrada a recuperar.

Valores devueltos

El valor si la clave existe, o null si la clave no era parte del hash.

Ejemplos

Ejemplo #1 Ejemplo de QuickHashStringIntHash::get()

<?php
$hash
= new QuickHashStringIntHash( 8 );
var_dump( $hash->get( "one" ) );

var_dump( $hash->add( "two", 2 ) );
var_dump( $hash->get( "two" ) );
?>

El resultado del ejemplo sería algo similar a:

bool(false)
bool(true)
int(2)

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top