Bug #15606: Parent instance by reference in objects
| From: | msopacua at idg dot nl | Date: | Mon, 18 Feb 2002 21:28:43 +0000 |
| Subject: | Bug #15606: Parent instance by reference in objects | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-524@lists.php.net to get a copy of this message | ||
From: msopacua@idg.nl
Operating system: Any
PHP version: 4.1.1
PHP Bug Type: Feature/Change Request
Bug description: Parent instance by reference in objects
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 bug report at http://bugs.php.net/?id=15606&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=15606&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=15606&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=15606&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=15606&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15606&r=support
Expected behavior: http://bugs.php.net/fix.php?id=15606&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=15606&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=15606&r=submittedtwice