From:             a at phpe dot net
Operating system: windowx xp
PHP version:      4.3.4
PHP Bug Type:     Arrays related
Bug description:  arrays value maybe not correct

Description:
------------
see the code below

the first block code's output i think will be: NULL & FALSE



As i think:

the code:

$a["a"]["b"];

will equal to 

array('a'=>array("b"));



may be i wrong? or that's a bug??



Reproduce code:
---------------
<?php

# First block

$a[] = "abc";

print_r($a);



// may be wrong here

echo $a[0][2]; // output: c, may be "null"?

echo isset($a[0][2]); // output: 1 (true), may be "false"?



######################



# Second block

$a["1"] = "123";

$a["1"]["2"] = 'abc';



print_r($a);

echo $a[1]; // output:12a, may will be "123"($a["1"]) ??

?>



Expected result:
----------------
Array

(

    [0] => abc

)



Array

(

    [0] => Array

           (

             [2] => abc

           )

    [1] => 123

)

12a



Actual result:
--------------
Array

(

    [0] => abc

)

c1



Array

(

    [0] => abc

    [1] => 12a

)

12a



-- 
Edit bug report at http://bugs.php.net/?id=27447&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27447&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27447&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27447&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27447&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27447&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27447&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27447&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27447&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27447&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27447&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27447&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27447&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27447&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27447&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27447&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27447&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27447&r=float

Reply via email to