Bug #4773: Null character after key name in uksort

From: Date: Fri, 02 Jun 2000 11:48:55 +0000
Subject: Bug #4773: Null character after key name in uksort
Groups: php.dev 
Request: Send a blank email to php-dev+get-20039@lists.php.net to get a copy of this message
From: radekg@elektrownia-lagisza.com.pl Operating system: Solaris 2.6, probably all PHP version: 3.0.16 PHP Bug Type: Misbehaving function Bug description: Null character after key name in uksort SCRIPT ------ function cmpfunc($a,$b) { echo "*$a**$b*<BR>"; echo strtr("*$a**$b*<BR>","\0","_"); if ($a<$b) return -1; else if ($a==$b) return 0; else return 1; } $a=array("a" => 1, "b" => 2); uksort($a,cmpfunc); OUTPUT ------ *a *a_**b_* *a *a_**b_* CONFIGURE --------- ./configure --with-apxs=/usr/local/bin/apxs \ --with-config-file-path=/usr/local/apache/conf \ --with-pgsql=/usr/local/ --with-gd=$HOME/ \ --with-snmp --with-sysvsem --with-sysvshm Apache version: 1.3.11 The same thing happens on Linux with PHP 3.0.12.

« previous php.dev (#20039) next »