ID:               30179
 User updated by:  oliver at teqneers dot de
 Reported By:      oliver at teqneers dot de
 Status:           Bogus
 Bug Type:         Arrays related
 Operating System: Suse 9.0
 PHP Version:      4.3.8
 New Comment:

But is there any way I can show it to you? because it 
really happens. I haven't seen it before. I already 
tried to d/l and install the 4.3.9RC3 but had the same 
results. Is it possible, that there is a library 
dependency, which might be responsible for that? I can't 
tell the exact point of time, when it occured the first 
time, but it might happen with the last SuSE update.


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

[2004-09-22 00:36:27] [EMAIL PROTECTED]

It still works fine here, and it works fine with every PHP version that
I have on my system.

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

[2004-09-22 00:30:01] oliver at teqneers dot de

This is definately no BOGUS. If you like i can send you 
screenshots or the output of the phpinfo(). You can ask 
Hartmut Holzgraefe about me. I used to work with him and 
I am programming PHP for years. This is a bug and it 
does happen everytime I execute this tiny script.
I sent in live output data.

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

[2004-09-22 00:04:44] [EMAIL PROTECTED]

Works fine here with 4.3.6, 4.3.8, 4.3.9-dev, 5.0.1 and 5.1.0-dev.

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

[2004-09-21 15:50:47] oliver at teqneers dot de

Description:
------------
When I copy an array with a normal "=" the copy is not a real copy, but
a reference to it. This only seems to happen to cascaded arrays.
When an entry of the original array is unset, the copied entry will be
unset as well.

Reproduce code:
---------------
$arr    = array( 'in' => array(1,2,3) );
$copy   = $arr;

print_r($copy);
unset( $arr['in'][1] );
print_r($copy);


Expected result:
----------------
Array
(
    [in] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
        )

)

Array
(
    [in] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
        )

)



Actual result:
--------------
Array
(
    [in] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
        )

)

Array
(
    [in] => Array
        (
            [0] => 1
            [2] => 3
        )

)




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


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

Reply via email to