Re: serialize bug with array that references to itself?
| From: | Andrey Hristov | Date: | Wed, 03 Nov 2004 16:03:53 +0000 |
| Subject: | Re: serialize bug with array that references to itself? | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-13711@lists.php.net to get a copy of this message | ||
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: <?php $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...