php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #15606 Parent instance by reference in objects
Submitted: 2002-02-18 16:28 UTC Modified: 2010-12-22 14:55 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: msopacua at idg dot nl Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.1.1 OS: Any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: msopacua at idg dot nl
New email:
PHP Version: OS:

 

 [2002-02-18 16:28 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-22 14:55 UTC] johannes@php.net
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: *General Issues
 [2010-12-22 14:55 UTC] johannes@php.net
I do not understand what this is about.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 17:01:33 2024 UTC