usort crashes

From: Date: Mon, 30 Dec 2002 11:22:07 +0000
Subject: usort crashes
Groups: php.general 
Request: Send a blank email to php-general+get-129646@lists.php.net to get a copy of this message
A quite anusual problem - and I can't figure it out.. My script, using the usort-function works properly on my local php-environment (PHP 4.0.6) but not on my server, running php 4.1.2! I've read in a documentation, that php since 4.1.0 doesn't accept zero as return-value of the compare-function. But that value never occurs in my script! There are no error messages, the server just stops interpreting my script after 7 calls of the compare function - no farther commands are recognized! The max. execution-time isn't exceeded; i've tested that. If I replace usort, and use a bubblesort function instead, everythings works fine.. I use: > for ($a = 0; $a < count($zeile); $a++) > > for ($b = $a; $b < count($zeile); $b++) > > $c = sortieren($zeile[$a], $zeile[$b]); > if ($c < 0){ $temp = $zeile[$a]; $zeile[$a] = $zeile[$b]; $zeile[$b] = $temp; } > } } It's a strange problem, isn't it? Thanks in advance.

« previous php.general (#129646) next »