Annotation of embedaddon/php/Zend/tests/bug55135.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #55135 (Array keys are no longer type casted in unset())
3: --FILE--
4: <?php
5: // This fails.
6: $array = array(1 => 2);
7: $a = "1";
8: unset($array[$a]);
9: print_r($array);
10:
11: // Those works.
12: $array = array(1 => 2);
13: $a = 1;
14: unset($array[$a]);
15: print_r($array);
16:
17: $array = array(1 => 2);
18: unset($array[1]);
19: print_r($array);
20:
21: $array = array(1 => 2);
22: $a = 1;
23: unset($array["1"]);
24: print_r($array);
25: ?>
26: --EXPECT--
27: Array
28: (
29: )
30: Array
31: (
32: )
33: Array
34: (
35: )
36: Array
37: (
38: )
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>