Hi,
I prepared a patch [1] which enables serialize()
to keep track of
object/variable references through its var_hash throughout
recursive calls to serialize()
.
See the test included in the patch respectively bug #45706 [2]
what this exactly means.
It also has the side affect that the hack [3] in spl_array.c
is apparently no longer needed.
All serialization tests pass.
There should not be any need to change external code (except
hack-alike things like those obsoleted in spl_array.c), but ABI
compatibility is broken and it's quite an intrusive change to
the serialization code, so I start here and not with svn ci
;)
Objections, comments?
Cheers,
Mike
[1]http://dev.iworks.at/PATCHES/keep_refs_with_recursive_serialize.txt
[2]http://bugs.php.net/45706
[3] http://svn.php.net/viewvc/php/php-src/trunk/ext/spl/spl_array.c?r1=264490&r2=265477
See the test included in the patch respectively bug #45706 [2]
what this exactly means.
Sorry, wrong bug referenced. The request I actually meant is 36424:
http://bugs.php.net/36424
Mike
So I guess, nobody objects to me committing it then.
Regards,
Mike
Hi,
I prepared a patch [1] which enables
serialize()
to keep track of
object/variable references through its var_hash throughout
recursive calls toserialize()
.See the test included in the patch respectively bug #45706 [2]
what this exactly means.It also has the side affect that the hack [3] in spl_array.c
is apparently no longer needed.All serialization tests pass.
There should not be any need to change external code (except
hack-alike things like those obsoleted in spl_array.c), but ABI
compatibility is broken and it's quite an intrusive change to
the serialization code, so I start here and not withsvn ci
;)Objections, comments?
Cheers,
Mike[1]http://dev.iworks.at/PATCHES/keep_refs_with_recursive_serialize.txt
[2]http://bugs.php.net/45706
[3]
http://svn.php.net/viewvc/php/php-src/trunk/ext/spl/spl_array.c?r1=264490&r2=265477