Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<HashContext::__constructHashContext::__serialize>
^HashContextLast updated: Mon, 26 Oct 2026

HashContext::__debugInfo

(PHP 8 >= 8.4.0)

HashContext::__debugInfo — Returns debugging information about the hashing context

Description

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.

Parameters

This function has no 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

Example #1 HashContext::__debugInfo() example

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

The above example will output:

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

See Also

  • hash_init() - Initialize an incremental hashing context
  • var_dump() - Dumps information about a variable

<HashContext::__constructHashContext::__serialize>
^HashContextLast updated: Mon, 26 Oct 2026