PHP 8.4.24 Released!

HashContext::__debugInfo

(PHP 8 >= 8.4.0)

HashContext::__debugInfoReturns debugging information about the hashing context

Descrizione

public function HashContext::__debugInfo(): array

This method is not meant to be called directly; it is invoked by var_dump() and related functions when inspecting a HashContext instance.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns an associative array of debugging information. It contains an algo key holding the name of the hashing algorithm in use by the context.

Esempi

Example #1 HashContext::__debugInfo() example

<?php
$ctx = hash_init('sha256');
var_dump($ctx);
?>

Il precedente esempio visualizzerà:

object(HashContext)#1 (1) {
  ["algo"]=>
  string(6) "sha256"
}

Vedere anche:

  • hash_init() - Initialize an incremental hashing context
  • var_dump() - Stampa delle informazioni relative ad una variabile
add a note

User Contributed Notes

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