ID:               21444
 User updated by:  [EMAIL PROTECTED]
-Summary:          Asort output not fully sorted in mixed type array
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Arrays related
 Operating System: Windows XP Pro Build 2600
 PHP Version:      4.3.0
 New Comment:

Well, it appears to be only related to the BOOLEAN array item. Removing
that from the original array leaves a perfectly sorted array as far as
I can see now.


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

[2003-01-05 16:26:51] [EMAIL PROTECTED]

I use PHP4.0.3 on Apache 1.3.27, both standard binaries as supplied on
the download site. Freshly installed yesterday. No modifications. I
used the php.ini-recommended file as php.ini
Installed exactly as prescribed in install.txt, only instead of c:/php
I use d:/program files/php and changed the ini accordingly.
Adapted the apache conf file as described. 

I used below script in an attempt to judge workload forced on the php
server as well as asort() speed. Output is a bit large to add here, but
can be requested via my email. In short, the array IS sorted, but in
all identical "subrows" every now and then one or two array items are
1's (I assume the equivalent of TRUE. Rerunning the script  results in
the SAME faults. Sorting within the script twice or more does not
change the faulty array.
Tried with single-type arrays, that doesn't seem to produce the same
errors, but this was not thoroughly tested. 

I am sorry, but I haven't figured out a way to get a backtrace yet, I 
am relatively new to this PHP stuff.
For your convenience, you can run the script from my server by opening
http://eniac.xs4all.nl/tut8.php and see my PHP server details on
http://eniac.xs4all.nl/x345info.php (I noticed this script still 'sees'
remainders of previous 1.3.24 apache as well as the correct 1.3.27
installs, allthough the .24 has been removed...

More info ? Contact me at my email. Thanks!
<?php
        $arr1 = array("a","b","c","d","4",5,4,"true","TRUE",true);
/*
 concatenate to itself 10 times to get a real LONG array (5120
elements)
*/
        for ($p = 1; $p < 10; $p++) 
                { $arr1 = array_merge ($arr1,$arr1); }
        asort($arr1);
        foreach ($arr1 as $val) 
                { print $val."  ";}

?>

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


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

Reply via email to