/tmp/cvsC99PtG

/tmp/cvsC99PtG


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@237899 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hannes Magnusson 2007-06-17 09:47:38 +00:00
parent 0d40844350
commit f5c0015a1c

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.17 $ -->
<!-- $Revision: 1.18 $ -->
<refentry id="function.session-set-save-handler">
<refnamediv>
<refname>session_set_save_handler</refname>
@ -183,14 +183,14 @@ session_start();
&reftitle.notes;
<warning>
<para>
Write and Close handlers are called after destructing objects since PHP
5.0.5. Thus destructors can use sessions but session handler can't use
objects. In prior versions, they were called in the opposite order. It
is possible to call <function>session_write_close</function> from the
destructor to solve this chicken and egg problem.
As of PHP 5.0.5 the <parameter>write</writet> and
<parameter>close</parameter> handlers are called after object
destruction and therefore cannot use objects or throw exceptions.
The object destructors can however use sessions.
</para>
<para>
Write and Close handlers cannot throw exceptions.
It is possible to call <function>session_write_close</function> from the
destructor to solve this chicken and egg problem.
</para>
</warning>
</refsect1>