php8.5
Home/ Manual/ hash / hashcontext/ HashContext::__debugInfo

HashContext::__debugInfo

PHP function Edit on GitHub ✎

(PHP 8 >= 8.4.0)

Returns debugging information about the hashing context

Description

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.

Parameters Parameters

Return Values

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

Examples

HashContext::__debugInfo example

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

The above example will output:

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

See Also

Source: reference/hash/hashcontext/debuginfo.xml · from the official PHP manual (php/doc-en)