ID:               27447
 User updated by:  a at phpe dot net
 Reported By:      a at phpe dot net
 Status:           Open
 Bug Type:         Arrays related
 Operating System: windowx xp
 PHP Version:      4.3.4
 New Comment:

Expected result is:

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

Array

(

    [0] => abc

)



Array

(

    [0] => Array

           (

             [2] => abc

           )

    [1] => 123

)

123


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

[2004-03-01 09:00:29] a at phpe dot net

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 this bug report at http://bugs.php.net/?id=27447&edit=1

Reply via email to