Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions reference/funchand/functions/register-shutdown-function.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
function, processing will stop completely and no other registered
shutdown functions will be called.
</para>
<caution>
<simpara>
Calling <function>exit</function> within a registered shutdown function
overwrites any exit code of previous <function>exit</function> calls
since PHP 8.4.0
Comment thread
PrinsFrank marked this conversation as resolved.
Outdated
</simpara>
</caution>
<para>
Shutdown functions may also call <function>register_shutdown_function</function>
themselves to add a shutdown function to the end of the queue.
Expand Down
9 changes: 9 additions & 0 deletions reference/misc/functions/exit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,15 @@
<link linkend="functions.variable-functions">variable functions</link>.
</entry>
</row>
<row>
<entry>8.4.0</entry>
<entry>
When calling <function>exit</function> within
<link linkend="function.register-shutdown-function">Shutdown functions</link>
or <link linkend="language.oop5.decon.destructor">object destructors</link>
any previous exit code gets overwritten
Comment thread
PrinsFrank marked this conversation as resolved.
Outdated
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
Expand Down