blob: a1ffff21f945f62a9a50193d65af2cc54c252df8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
--TEST--
Bug #55135 (Array keys are no longer type casted in unset())
--FILE--
<?php
// This fails.
$array = array(1 => 2);
$a = "1";
unset($array[$a]);
print_r($array);
// Those works.
$array = array(1 => 2);
$a = 1;
unset($array[$a]);
print_r($array);
$array = array(1 => 2);
unset($array[1]);
print_r($array);
$array = array(1 => 2);
unset($array["1"]);
print_r($array);
?>
--EXPECT--
Array
(
)
Array
(
)
Array
(
)
Array
(
)
|