Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13711 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93295 invoked by uid 1010); 3 Nov 2004 16:07:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 89997 invoked from network); 3 Nov 2004 16:06:36 -0000 Received: from unknown (HELO iko.gotobg.net) (80.168.8.116) by pb1.pair.com with SMTP; 3 Nov 2004 16:06:36 -0000 Received: from pd95e9886.dip.t-dialin.net ([217.94.152.134] helo=[192.168.0.36]) by iko.gotobg.net with esmtpa (Exim 4.43) id 1CPNeg-0002f8-4q; Wed, 03 Nov 2004 18:06:38 +0200 Message-ID: <41890169.1020107@hristov.com> Date: Wed, 03 Nov 2004 17:03:53 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a4) Gecko/20040918 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Francisco M. Marzoa Alonso" , internals@lists.php.net References: <4188DEC8.5060309@gmx.net> <4188DDC9.30000@hristov.com> <4189013F.2050104@gmx.net> <4188F4CC.6000902@hristov.com> <41890B41.5020703@gmx.net> In-Reply-To: <41890B41.5020703@gmx.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - iko.gotobg.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - hristov.com X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [PHP-DEV] serialize bug with array that references to itself? From: php@hristov.com (Andrey Hristov) Well, when there is traversion inside the engine, it checks whether it has processed a "node" already several times. As far as I remember the threshold is 3. So once it goes over $Arr, the counter increases to 1, the second time to 2 and third time it is 3 and ZE reports recursion. HTH, Andrey Francisco M. Marzoa Alonso wrote: > BTW., I'm not sure that there's nothing more wrong here. Takin the first > part of the code of first example: > > > $Arr = array(); > $Arr['self'] = &$Arr; > var_dump ( $Arr ); > > ?> > > It returns: > > array(1) { > ["self"]=> > array(1) { > ["self"]=> > *RECURSION* > } > } > > Is that as its expected to be? I meant that perhaps it should be: > > array(1) { > ["self"]=> > *RECURSION* > } > > Since the element in $Arr['self'] is yet (or at least should be) a > reference to itself... >