ID:               8325
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: *
 PHP Version:      4.0 Latest CVS (19/12/2000)
 New Comment:

Related to bug #21918



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

[2000-12-19 15:54:22] [EMAIL PROTECTED]

(Actually, this is for PHP 4 versions up to 4.0.4 RC6, but it ain't in
the version list.)

I don't want to sound harsh or something, and this behavior seemed to
be accepted as feature from what I saw elsewhere in the bug database
(can't find it, though), but I think it shouldn't be that way. 

Current behavior:

<?
$p = 1 ;
settype( $p , 'string' ) ;
$a = array( $p => 'aaaa' ) ;
var_dump( $a ) ;
?>

output (note: casting within the array() doesn't help):
string(1) "1"
array(1) {
  [1]=>
  string(4) "aaaa"
}


'Right' (YMMV) behavior:
string(1) "1"
array(1) {
  ["1"]=>
  string(4) "aaaa"
}


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


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

Reply via email to