ID:               44933
 Updated by:       [EMAIL PROTECTED]
 Reported By:      remon at menpmedia dot nl
 Status:           Bogus
 Bug Type:         Class/Object related
 Operating System: Fedora Core 4
 PHP Version:      5.2.6
 New Comment:

I am running this on 64bit linux, and on 32bit as well. I get the same
correct result.


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

[2008-05-07 09:28:04] remon at menpmedia dot nl

Thank you scottmac, this helps a bit.

Should I consider PHP5/x64/linux bugged then for NOT reflecting this
behavioural change ?

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

[2008-05-07 09:23:45] [EMAIL PROTECTED]

The behavior changed between php4 and php5. When you pass around an
object it uses the same instance.

The clone keyword will let you duplicate an object.

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

[2008-05-07 09:23:25] remon at menpmedia dot nl

Bogus ???

$two = $one;

is not the same as

$two =& $one;

PHP4 all platforms understand this
PHP5 on x64 understands this

so, if this is bogus, how do I make a copy of an object and not have
changes to the copy affect the original object?

Arrays are unaffected as are normal variables

So, again, if this is bogus, the following is then true;

the assignment operator ' = ' makes a copy of a variable on the
righthand side EXCEPT when the righthandside is an object

This does not make sense.

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

[2008-05-07 09:19:29] remon at menpmedia dot nl

Tested versions:
php 5.2.4 / fedora core 8 / x64: no problem
php 5.2.6 / fedora core 4 / x32: bug occurs
php 5.0.5 / fedora core 4 / x32: bug occurs

php 5.2.4 / win32 : bug occurs (downloaded the binary and executed
script)
php 5.2.6 / win32 : bug occurs
php 4.4.8 / win32 : no problem

---
Thoughts: 

Has this behaviour changed in php5? why does ' = ' do the same as ' =&
' ?
Why do 2 different FC4 servers have this problem and an FC8 does not?
Could this be a difference in 32 bit and 64 bit versions?

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

[2008-05-07 08:53:17] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Both PHP versions give the same *correct* result that you get under
\"Actual result\".

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

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/44933

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

Reply via email to