Skip to content

Commit a9134a4

Browse files
author
Julien Pauli
committed
A note on MINFO()
1 parent ee7dd70 commit a9134a4

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Book/php7/extensions_design/php_lifecycle.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,21 @@ Remember that globals are not cleared after every request; aka ``GSHUTDOWN()`` i
243243

244244
.. note:: Global scope management is explained into :doc:`a dedicated chapter <globals_management>`.
245245

246+
Information gathering: MINFO()
247+
------------------------------
248+
249+
That hook is special as it is never triggered automatically by the engine, but only when you ask it informations about
250+
an extension. The typical use case is a call to ``phpinfo()``. This function is then run, and it is expected to print
251+
into a stream special informations about the current extension.
252+
253+
The ``phpinfo()`` panel informations, in short.
254+
255+
This function can also be called through the CLI, using one of the reflection switch such as ``php --ri pib`` or via
256+
userland with a call to ``ini_get_all()`` f.e
257+
258+
You may leave it empty, in such a case only the name of the extension is displayed and nothing more (possible INI
259+
settings are not displayed as this happens as part of MINFO()).
260+
246261
Thoughts on PHP lifecycle
247262
-------------------------
248263
.. image:: ./images/php_extensions_lifecycle.png

0 commit comments

Comments
 (0)