ID:               26873
 Updated by:       [EMAIL PROTECTED]
 Reported By:      richard at garandnet dot net
-Status:           Verified
+Status:           Feedback
 Bug Type:         Class/Object related
 Operating System: *
 PHP Version:      5CVS, 4CVS
 New Comment:

btw. What's the idea with doing this anyway?



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

[2004-01-11 19:13:58] [EMAIL PROTECTED]

Output with latest PHP 5 (HEAD) cvs:

Array
(
    [name] => c
)
/usr/src/web/php/php5/Zend/zend_API.c(721) :  Freeing 0x40E4ACBC (32
bytes), script=t.php
/usr/src/web/php/php5/Zend/zend_hash.c(157) : Actual location (location
was relayed)
/usr/src/web/php/php5/Zend/zend_execute.c(3095) :  Freeing 0x40E489CC
(44 bytes), script=t.php
/usr/src/web/php/php5/Zend/zend_API.c(720) : Actual location (location
was relayed)
/usr/src/web/php/php5/Zend/zend_execute.c(3094) :  Freeing 0x40E482C4
(16 bytes), script=t.php
/usr/src/web/php/php5/Zend/zend_objects.c(88) :  Freeing 0x40E4823C (12
bytes), script=t.php
=== Total 4 memory leaks detected ===

Output with latest PHP 4_3 checkout:

Array
(
    [name] => c
)
/usr/src/web/php/php4/Zend/zend_API.c(594) :  Freeing 0x08644A24 (44
bytes), script=t.php
/usr/src/web/php/php4/Zend/zend_API.c(582) : Actual location (location
was relayed)
/usr/src/web/php/php4/Zend/zend_hash.c(188) :  Freeing 0x0864EC4C (32
bytes), script=t.php
/usr/src/web/php/php4/Zend/zend_execute.c(1979) :  Freeing 0x0864E4DC
(12 bytes), script=t.php


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

[2004-01-11 15:20:16] richard at garandnet dot net

Description:
------------
 

Reproduce code:
---------------
class B
{
  function B($name) {
    $this->name = $name;
  }
}
class A
{
  function A($b) {
    print_r(get_object_vars($b));
  }
}

new A(new B("c"));
$bug = new A(new B("c"));

Expected result:
----------------
Output: 
Array ( [name] => c ) 
Array ( [name] => c ) 

Actual result:
--------------
Output: 
Array ( [name] => b Object ( [name] => *RECURSION* ) ) 
Array ( [name] => c ) 


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


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

Reply via email to