#24128 [Opn->Fbk]: recursion in array
| From: | sniper@php.net | Date: | Wed, 11 Jun 2003 16:37:02 +0000 |
| Subject: | #24128 [Opn->Fbk]: recursion in array | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-41686@lists.php.net to get a copy of this message | ||
ID: 24128
Updated by: sniper@php.net
Reported By: young at sl dot com dot ua
-Status: Open
+Status: Feedback
Bug Type: Arrays related
Operating System: Win2k
PHP Version: 4.3.2
New Comment:
What exactly you think is the problem here?
What are you expecting to get..?
Same array as before serialize?
What possible use is there to have recursion in an array..?
Previous Comments:
------------------------------------------------------------------------
[2003-06-11 10:27:58] young at sl dot com dot ua
<?php
echo '<pre>';
$a = array(1, 2, 3);
$a[1] = &$a;
print_r($a);
print_r(unserialize(serialize($a)));
?>
Display:
Array
(
[0] => 1
[1] => Array
*RECURSION*
[2] => 3
)
Array
(
[0] => 1
[1] => Array
(
[0] => 1
[1] =>
[2] => 3
)
[2] => 3
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24128&edit=1