|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-25 04:48 UTC] crrodriguez at suse dot de
[2007-08-25 05:28 UTC] bug at nyvegetarianexpo dot org
[2007-08-25 05:32 UTC] bug at nyvegetarianexpo dot org
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Feb 03 03:00:01 2026 UTC |
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...