php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4773 Null character after key name in uksort
Submitted: 2000-06-02 13:48 UTC Modified: 2002-10-01 15:02 UTC
From: radekg at elektrownia-lagisza dot com dot pl Assigned:
Status: Wont fix Package: Misbehaving function
PHP Version: 3.0.16 OS: Solaris 2.6, probably all
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: radekg at elektrownia-lagisza dot com dot pl
New email:
PHP Version: OS:

 

 [2000-06-02 13:48 UTC] radekg at elektrownia-lagisza dot com dot pl
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-01 15:02 UTC] hholzgra@php.net
We are sorry, but can not support PHP 3 related problems anymore.
Momentum is gathering for PHP 5, and we think supporting PHP 3 will
lead to a waste of resources which we want to put into getting PHP 5
ready. Ofcourse PHP 4 will will continue to be supported for the
forseeable future.

looks fine in php 4.2.3
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC