ID:               29390
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tim at tenkan dot org
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: linux
 PHP Version:      4.3.7
 New Comment:

There are some memory leaks also:
/home/tony/CVS/php-src/Zend/zend_execute.c(662) :  Freeing 0x3D17C590
(16 bytes), script=var_dump.test.php
/home/tony/CVS/php-src/Zend/zend_execute.c(3360) :  Freeing 0x3D17B9E8
(32 bytes), script=var_dump.test.php
/home/tony/CVS/php-src/Zend/zend_hash.c(169) : Actual location
(location was relayed)
Last leak repeated 1 time
/home/tony/CVS/php-src/Zend/zend_execute.c(3243) :  Freeing 0x3D174CB4
(16 bytes), script=var_dump.test.php



Previous Comments:
------------------------------------------------------------------------

[2004-07-26 17:35:23] tim at tenkan dot org

Description:
------------
var_dump() treats objects and arrays differently when they 
contain references to themselves.

Reproduce code:
---------------
<?php

class a {
}

$a = new a();
$a->foo =& $a;
var_dump($a);

$b = array();
$b[1] =& $b;
var_dump($b);


?>


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


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




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29390&edit=1

Reply via email to