keeping ref var_hash within recursive serialize() calls

From: Date: Fri, 21 May 2010 08:46:24 +0000
Subject: keeping ref var_hash within recursive serialize() calls
Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
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




Thread (3 messages)

« previous php.internals (#48369) next »