|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-01-11 15:20 UTC] 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 )
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 15:00:01 2025 UTC |
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