Re: [RFC DISCUSSION] User defined session serializer
| From: | Yasuo Ohgaki | Date: | Wed, 30 Nov 2016 05:31:14 +0000 |
| Subject: | Re: [RFC DISCUSSION] User defined session serializer | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-97229@lists.php.net to get a copy of this message | ||
Hi Markus,
On Sat, Nov 19, 2016 at 1:15 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote:
>> Btw, what is the proper way to signal a problem during
>> serialization/unserialization? I couldn't figure it out from the RFC nor
>> the PR and there doesn't seem to be a test case for it.
>> Return null/false? Throw an exception?
I added test and add return value description in RFC sample code.
Serialize function should return "string".
Unserialize function should return "array".
Anything other data type raises E_RECOVERABLE_ERROR, so returning
FALSE would be the reasonable choice to indicate error condition.
To all,
If there is no additional comment, I'll start vote in a few days.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net