ID:               42419
 Comment by:       crrodriguez at suse dot de
 Reported By:      bug at nyvegetarianexpo dot org
 Status:           Open
 Bug Type:         Reproducible crash
 Operating System: Linux
 PHP Version:      5.2.3
 New Comment:

There is no array_sort function in the PHP source code.. what are you
talking about ?

functions are asort() and array_multisort and both work fine with your
code..care to provide a working test ?


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

[2007-08-24 23:25:18] bug at nyvegetarianexpo dot org

Description:
------------
Depending on the array passed to it, the built in function array_sort
will never return and all output after it be lost.  The code needed to
reproduce this bug is embassingly simply.  It will bomb on an array of
length two, but also others, but not all arrays.  It actually works for
some.

I am not privy to all their compilation/configuration options, but I
have run into this problem with two HSPs both on a linux box.  I can
print_r(get_defined_constants()); if desired, however.

Reproduce code:
---------------
<HTML><TITLE>Array_sort bug test</TITLE><BODY>
<pre>
<?php
$a[] = '2007-09-15 10:00:00';
$a[] = '2007-09-15 16:00:00';
print_r($a);
echo "\nHANGS...\n";
array_sort($a);
print_r($a);
?>
</pre>
<b>No, it works!</b>
</BODY>
</HTML>

Expected result:
----------------
Array
(
    [0] => 2007-09-15 10:00:00
    [1] => 2007-09-15 16:00:00
)

HANGS...

Array
(
    [0] => 2007-09-15 10:00:00
    [1] => 2007-09-15 16:00:00
)

No, it works!

Actual result:
--------------
Array
(
    [0] => 2007-09-15 10:00:00
    [1] => 2007-09-15 16:00:00
)

HANGS...



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


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

Reply via email to