ID:               21396
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: w2k, linux
 PHP Version:      4.2.3
 New Comment:

RTFM: http://www.php.net/manual/en/language.types.array.php

"A key is either an integer or a string"


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

[2003-01-03 14:24:08] [EMAIL PROTECTED]

just see code
<?
error_reporting(E_ALL);

$aa = pack("N",127);
$bb = pack("N",65);
$cc = pack("N",121344231);

echo "$aa\n";
echo "$bb\n";
echo "$cc\n";

$tmp=array();

$tmp[$aa] = "aa";
$tmp[$bb] = "bb";
$tmp[$cc] = "cc";

var_dump($tmp);
?>

output:

A
;Ð÷
array(3) {
  [""]=>
  string(2) "aa"
^^^^^^^ but needed [""] => "aa" ???
  [""]=>
  string(2) "bb"
  [";Ð÷"]=>
  string(2) "cc"
}

WHY ?

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


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

Reply via email to