#26873 [Fbk->NoF]: Constructors have problems with parameters when result of new isn't assigned
| From: | sniper@php.net | Date: | Wed, 18 Feb 2004 08:02:29 +0000 |
| Subject: | #26873 [Fbk->NoF]: Constructors have problems with parameters when result of new isn't assigned | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-55133@lists.php.net to get a copy of this message | ||
ID: 26873
Updated by: sniper@php.net
Reported By: richard at garandnet dot net
-Status: Feedback
+Status: No Feedback
Bug Type: Class/Object related
Operating System: *
PHP Version: 5CVS, 4CVS
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2004-02-13 10:16:19] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2004-02-08 11:49:33] sniper@php.net
btw. What's the idea with doing this anyway?
------------------------------------------------------------------------
[2004-01-11 19:13:58] sniper@php.net
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