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
 [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

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-27 14:25 UTC] tony2001@php.net
Duplicate of #29390.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 11:01:33 2024 UTC