php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24128 recursion in array
Submitted: 2003-06-11 10:27 UTC Modified: 2003-06-18 15:11 UTC
Votes:4
Avg. Score:4.0 ± 1.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: young at sl dot com dot ua Assigned:
Status: No Feedback Package: Arrays related
PHP Version: 4.3.2 OS: Win2k
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
44 - 21 = ?
Subscribe to this entry?

 
 [2003-06-11 10:27 UTC] 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
)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-11 11:37 UTC] sniper@php.net
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..?

 [2003-06-18 15:11 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 09:01:27 2025 UTC