ID:               39202
 User updated by:  cpriest at warpmail dot net
 Reported By:      cpriest at warpmail dot net
 Status:           Bogus
 Bug Type:         Arrays related
 Operating System: Apache 2.0.55
 PHP Version:      5.1.6
 New Comment:

I cannot reproduce, I'll give up.  Sorry to waste your time Tony.


Previous Comments:
------------------------------------------------------------------------

[2006-10-20 17:48:14] cpriest at warpmail dot net

Okay you're right, I'm an idiot, I see my error.

I saw something very similar occur in more complicated code and I tried
to write a simpler test case for it.

This obviously isn't right and doesn't demonstrate properly (nor even
demonstrate an issue).  I'll come up with something better, sorry Tony!

------------------------------------------------------------------------

[2006-10-20 17:15:12] [EMAIL PROTECTED]

Where did you manage to find THREE objects here?

Array
(
    [Test] => myClassA Object
        (
            [Name] => Object 3
        )

    [Test2] => myClassA Object
        (
            [Name] => Object 2
        )

)

------------------------------------------------------------------------

[2006-10-20 17:04:26] cpriest at warpmail dot net

> It does, but you call print_r() BEFORE changing it =)

I'm calling print_r() twice, once before and once after.  The before
shows correctly the after shows three objects exist...  What am I
missing?

------------------------------------------------------------------------

[2006-10-20 16:15:24] [EMAIL PROTECTED]

>it doesn't change the real object.
It does, but you call print_r() BEFORE changing it =)

------------------------------------------------------------------------

[2006-10-20 16:07:16] cpriest at warpmail dot net

I think there's some confusion here, if you look at the code source I
am only creating two objects.  When I call getReferenced() it returns a
table which has references to the created objects.

When I go to change the name of the object in the second table (the one
with references) it doesn't change the real object.  For some reason
there are then three objects when only two have been created.

If this is the expected behavior can you explain why?  I don't
understand why a third object is being created when I have used
references.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/39202

-- 
Edit this bug report at http://bugs.php.net/?id=39202&edit=1

Reply via email to