Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48369 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47693 invoked from network); 21 May 2010 08:46:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 May 2010 08:46:30 -0000 X-Host-Fingerprint: 78.142.172.145 gate-g21.inqnet.at Received: from [78.142.172.145] ([78.142.172.145:22859] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 34/81-45208-46846FB4 for ; Fri, 21 May 2010 04:46:28 -0400 Message-ID: <34.81.45208.46846FB4@pb1.pair.com> To: internals@lists.php.net Date: Fri, 21 May 2010 10:46:24 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Shredder/3.0.4 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 78.142.172.145 Subject: keeping ref var_hash within recursive serialize() calls From: mike@php.net (Michael Wallner) 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