Re: com php-src: Add optional second arg to unserialize(): ext/standard/basic_functions.c ext/standard/tests/serialize/serialization_error_001.phpt
ext/standard/tests/serialize/unserialize_consumed.phpt ext/standard/var.c
| From: | Nikita Popov | Date: | Fri, 17 May 2013 07:42:15 +0000 |
| Subject: | Re: com php-src: Add optional second arg to unserialize(): ext/standard/basic_functions.c ext/standard/tests/serialize/serialization_error_001.phpt ext/standard/tests/serialize/unserialize_consumed.phpt ext/standard/var.c |
||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-72194@lists.php.net to get a copy of this message | ||
On Fri, May 17, 2013 at 12:18 AM, Sara Golemon <pollita@php.net> wrote:
> Commit: cfd104582220d578ab1b78a5991065d038e1f931
> Author: Sara Golemon <pollita@php.net> Thu, 16 May 2013
> 14:37:36 -0700
> Parents: bc656cde0453aa6de50812ba9edfc6f74c61ce37
> Branches: master
>
> Link:
>
> http://git.php.net/?p=php-src.git;a=commitdiff;h=cfd104582220d578ab1b78a5991065d038e1f931
>
> Log:
> Add optional second arg to unserialize()
>
> Returns the number of bytes consumed by reference for
> streaming unserialization.
>
> Actual unserialization behavior is not modified at all.
>
> The need for this came up while trying to parse SplDoublyLinkedList's
> serialization format which uses a non-standard stream of serialized values.
>
Imho this should have been briefly discussed on internals beforehand. At
least to me this seems rather dubious (why is it needed? why are you
manually parsing a part of the DLL serialization?) and also clashes with
Stas' proposed changes to unserialize.
Nikita