php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37451 array_multisort fails to trigger by val copy of data (works in PHP >= 5.1)
Submitted: 2006-05-15 22:01 UTC Modified: 2008-07-11 21:16 UTC
From: pavlos at psychology dot gr Assigned:
Status: Wont fix Package: Arrays related
PHP Version: 4.4.2 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pavlos at psychology dot gr
New email:
PHP Version: OS:

 

 [2006-05-15 22:01 UTC] 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 )


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-15 22:58 UTC] pavlos at psychology dot gr
Thank you for your lightning fast reply!

I have compiled the .tar.gz file. The problem is still here.
 [2008-07-11 21:16 UTC] jani@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 02 07:01:29 2024 UTC