Returns debugging information about the hashing context

# HashContext::__debugInfo

(PHP 8 >= 8.4.0)

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

### 说明

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.

### 参数

此函数没有参数。

### 返回值

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

### 示例

示例 #1 HashContext::__debugInfo() example

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

以上示例会输出：

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

### 参见

- hash_init() - 初始化增量散列运算上下文
- var_dump() - 打印变量的相关信息

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open