[doc-en] master: Document HashContext::__debugInfo (PHP 8.4) (#5359)

From: Date: Wed, 10 Jun 2026 19:33:32 +0000
Subject: [doc-en] master: Document HashContext::__debugInfo (PHP 8.4) (#5359)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23372@lists.php.net to get a copy of this message
Author: Louis-Arnaud (lacatoire) Committer: GitHub (web-flow) Pusher: jordikroon Date: 2026-06-10T21:33:29+02:00 Commit: https://github.com/php/doc-en/commit/ed4d79beef8c9abd379088eefc8901a6fece7a3b Raw diff: https://github.com/php/doc-en/commit/ed4d79beef8c9abd379088eefc8901a6fece7a3b.diff Document HashContext::__debugInfo (PHP 8.4) (#5359) Changed paths: A reference/hash/hashcontext/debuginfo.xml M reference/hash/versions.xml Diff: diff --git a/reference/hash/hashcontext/debuginfo.xml b/reference/hash/hashcontext/debuginfo.xml new file mode 100644 index 000000000000..5b545e91e234 --- /dev/null +++ b/reference/hash/hashcontext/debuginfo.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="utf-8"?> +<refentry xml:id="hashcontext.debuginfo" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <refnamediv> + <refname>HashContext::__debugInfo</refname> + <refpurpose>Returns debugging information about the hashing context</refpurpose> + </refnamediv> + + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis role="HashContext"> + <modifier>public</modifier> <type>array</type><methodname>HashContext::__debugInfo</methodname> + <void/> + </methodsynopsis> + <simpara> + This method is not meant to be called directly; it is invoked by + <function>var_dump</function> and related functions when inspecting a + <classname>HashContext</classname> instance. + </simpara> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + &no.function.parameters; + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <simpara> + Returns an associative array of debugging information. It contains an + <literal>algo</literal> key holding the name of the hashing algorithm + in use by the context. + </simpara> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <example> + <title><methodname>HashContext::__debugInfo</methodname> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$ctx = hash_init('sha256'); +var_dump($ctx); +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +object(HashContext)#1 (1) { + ["algo"]=> + string(6) "sha256" +} +]]> + </screen> + </example> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <simplelist> + <member><function>hash_init</function></member> + <member><function>var_dump</function></member> + </simplelist> + </refsect1> +</refentry> +<!-- Keep this comment at the end of the file +Local variables: +mode: sgml +sgml-omittag:t +sgml-shorttag:t +sgml-minimize-attributes:nil +sgml-always-quote-attributes:t +sgml-indent-step:1 +sgml-indent-data:t +indent-tabs-mode:nil +sgml-parent-document:nil +sgml-default-dtd-file:"~/.phpdoc/manual.ced" +sgml-exposed-tags:nil +sgml-local-catalogs:nil +sgml-local-ecat-files:nil +End: +vim600: syn=xml fen fdm=syntax fdl=2 si +vim: et tw=78 syn=sgml +vi: ts=1 sw=1 +--> diff --git a/reference/hash/versions.xml b/reference/hash/versions.xml index 128a828e8c88..b6fb844b3c93 100644 --- a/reference/hash/versions.xml +++ b/reference/hash/versions.xml @@ -6,6 +6,7 @@ <versions> <function name="HashContext" from="PHP 7 &gt;= 7.2.0, PHP 8"/> <function name="HashContext::__construct" from="PHP 7 &gt;= 7.2.0, PHP 8"/> + <function name="HashContext::__debugInfo" from="PHP 8 &gt;= 8.4.0"/> <function name="HashContext::__serialize" from="PHP 8"/> <function name="HashContext::__unserialize" from="PHP 8"/>

« previous php.doc.cvs (#23372) next »