blob: 3bcea0e1d295dfadbe36673752fecc08da526f12 (
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
|
--TEST--
Bug #24652 (broken array_flip())
--FILE--
<?php
/* This works */
$f = array('7' => 0);
var_dump($f);
var_dump(array_key_exists(7, $f));
var_dump(array_key_exists('7', $f));
print "----------\n";
/* This doesn't */
$f = array_flip(array('7'));
var_dump($f);
var_dump(array_key_exists(7, $f));
var_dump(array_key_exists('7', $f));
?>
--EXPECT--
array(1) {
[7]=>
int(0)
}
bool(true)
bool(true)
----------
array(1) {
[7]=>
int(0)
}
bool(true)
bool(true)
|