Req #15606 [Opn->Bgs]: Parent instance by reference in objects
| From: | johannes@php.net | Date: | Wed, 22 Dec 2010 13:55:48 +0000 |
| Subject: | Req #15606 [Opn->Bgs]: Parent instance by reference in objects | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-157245@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=15606&edit=1
ID: 15606
Updated by: johannes@php.net
Reported by: msopacua at idg dot nl
Summary: Parent instance by reference in objects
-Status: Open
+Status: Bogus
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: Any
PHP Version: 4.1.1
Block user comment: N
Private report: N
New Comment:
I do not understand what this is about.
Previous Comments:
------------------------------------------------------------------------
[2002-02-18 16:28:43] msopacua at idg dot nl
If you register a child on an object, which extends the parent, any
shared resources are duplicated - ie, the child creates an instance of
the parent.
For example, registering a database connection in the parent, and
consequently printing that connection from the child, will give you
"resource id #2", when the parent is "resource id #1".
Is there any way (in ZE2?) to use a reference to the parent or can't
this be helped, period?
Seems to me, that all these instances can, while in fact, they share the
exact same values, are just taking up memory.
If you need example code, let me know.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=15606&edit=1