php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29389 var_dump() output is a little random
Submitted: 2004-07-26 17:29 UTC Modified: 2004-07-27 14:25 UTC
From: tim at tenkan dot org Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.3.7 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tim at tenkan dot org
New email:
PHP Version: OS:

 

 [2004-07-26 17:29 UTC] tim at tenkan dot org
Description:
------------
two var_dump() calls right after each other print something
different, even though they're given the same argument




Reproduce code:
---------------
<?php 
$b = array(); 
$b[1] =& $b; 
$b =& $b; 
var_dump($b); 
var_dump($b); 
?>


Expected result:
----------------
array(1) {
  [1]=>
  &array(1) {
    [1]=>
    *RECURSION*
  }
}
array(1) {
  [1]=>
  &array(1) {
    [1]=>
    *RECURSION*
  }
}


Actual result:
--------------
array(1) {
  [1]=>
  &array(1) {
    [1]=>
    &array(1) {
      [1]=>
      *RECURSION*
    }
  }
}
array(1) {
  [1]=>
  array(1) {
    [1]=>
    *RECURSION*
  }
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-27 14:25 UTC] tony2001@php.net
Duplicate of #29390.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 02 12:01:36 2025 UTC