Bug #62268 [NEW]: Multi dimentional Array assigment issue

From: Date: Fri, 08 Jun 2012 20:13:57 +0000
Subject: Bug #62268 [NEW]: Multi dimentional Array assigment issue
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-171151@lists.php.net to get a copy of this message
From:             dmarkweb at gmail dot com
Operating system: CentOS 6.2
PHP version:      5.3.13
Package:          *General Issues
Bug Type:         Bug
Bug description:Multi dimentional Array assigment issue

Description:
------------
I found it pretty odd and surprisingly.

When I assign a property to multi-dimentional array it doesn't setting the
value 
correct.


Test script:
---------------
<?php

$myArray = array();

$myArray['one'] = 1;
$myArray['one']['two'] = 1;
$myArray['one']['two']['three'] = 1;

?>

Expected result:
----------------
Array
(
    [one] => Array
        (
            [two] => Array
                     (
                      [three] => 1
                     )
        )

)

Actual result:
--------------
Array
(
    [one] => 1
)

-- 
Edit bug report at https://bugs.php.net/bug.php?id=62268&edit=1
-- 
Try a snapshot (PHP 5.4):            https://bugs.php.net/fix.php?id=62268&r=trysnapshot54
Try a snapshot (PHP 5.3):            https://bugs.php.net/fix.php?id=62268&r=trysnapshot53
Try a snapshot (trunk):              https://bugs.php.net/fix.php?id=62268&r=trysnapshottrunk
Fixed in SVN:                        https://bugs.php.net/fix.php?id=62268&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62268&r=needdocs
Fixed in release:                    https://bugs.php.net/fix.php?id=62268&r=alreadyfixed
Need backtrace:                      https://bugs.php.net/fix.php?id=62268&r=needtrace
Need Reproduce Script:               https://bugs.php.net/fix.php?id=62268&r=needscript
Try newer version:                   https://bugs.php.net/fix.php?id=62268&r=oldversion
Not developer issue:                 https://bugs.php.net/fix.php?id=62268&r=support
Expected behavior:                   https://bugs.php.net/fix.php?id=62268&r=notwrong
Not enough info:                     https://bugs.php.net/fix.php?id=62268&r=notenoughinfo
Submitted twice:                     https://bugs.php.net/fix.php?id=62268&r=submittedtwice
register_globals:                    https://bugs.php.net/fix.php?id=62268&r=globals
PHP 4 support discontinued:          https://bugs.php.net/fix.php?id=62268&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=62268&r=dst
IIS Stability:                       https://bugs.php.net/fix.php?id=62268&r=isapi
Install GNU Sed:                     https://bugs.php.net/fix.php?id=62268&r=gnused
Floating point limitations:          https://bugs.php.net/fix.php?id=62268&r=float
No Zend Extensions:                  https://bugs.php.net/fix.php?id=62268&r=nozend
MySQL Configuration Error:           https://bugs.php.net/fix.php?id=62268&r=mysqlcfg



Thread (2 messages)

« previous php.bugs (#171151) next »