#37451 [Opn->WFx]: array_multisort fails to trigger by val copy of data (works in PHP >= 5.1)
| From: | jani@php.net | Date: | Fri, 11 Jul 2008 21:16:18 +0000 |
| Subject: | #37451 [Opn->WFx]: array_multisort fails to trigger by val copy of data (works in PHP >= 5.1) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-126525@lists.php.net to get a copy of this message | ||
ID: 37451
Updated by: jani@php.net
Reported By: pavlos at psychology dot gr
-Status: Open
+Status: Wont fix
Bug Type: Arrays related
Operating System: Linux
PHP Version: 4.4.2
New Comment:
We are sorry, but we can not support PHP 4 related problems anymore.
Momentum is gathering for PHP 6, and we think supporting PHP 4 will
lead to a waste of resources which we want to put into getting PHP 6
ready.
Previous Comments:
------------------------------------------------------------------------
[2006-05-15 22:58:14] pavlos at psychology dot gr
Thank you for your lightning fast reply!
I have compiled the .tar.gz file. The problem is still here.
------------------------------------------------------------------------
[2006-05-15 22:14:39] tony2001@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2006-05-15 22:01:30] pavlos at psychology dot gr
Description:
------------
This has been reported, filed as closed and in CVS, for more than a
year ago.
However, it is still alive in PHP 4.4.2.
Reproduce code:
---------------
$a = array(4, 3, 5, 2, 1);
$b = array(4, 3, 5, 2, 1);
$copy_a = $a;
array_multisort($copy_a);
print "\$a has changed as well: ";
print_r($a);
print "<BR>\$a should have been: ";
print_r($b);
Expected result:
----------------
$a has changed as well: Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4]
=> 5 )
$a should have been: Array ( [0] => 4 [1] => 3 [2] => 5 [3] => 2 [4] =>
1 )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37451&edit=1