File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug34518.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

    1: --TEST--
    2: Bug #34518 (Unset doesn't separate container in CV)
    3: --FILE--
    4: <?php
    5: $arr = array(1,2,3);
    6: $arr["foo"] = array(4,5,6);
    7: $copy = $arr;
    8: 
    9: unset($copy["foo"][0]);
   10: print_r($arr);
   11: print_r($copy);
   12: ?>
   13: --EXPECT--
   14: Array
   15: (
   16:     [0] => 1
   17:     [1] => 2
   18:     [2] => 3
   19:     [foo] => Array
   20:         (
   21:             [0] => 4
   22:             [1] => 5
   23:             [2] => 6
   24:         )
   25: 
   26: )
   27: Array
   28: (
   29:     [0] => 1
   30:     [1] => 2
   31:     [2] => 3
   32:     [foo] => Array
   33:         (
   34:             [1] => 5
   35:             [2] => 6
   36:         )
   37: 
   38: )

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>