summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug71028.phpt
blob: b8f0cc962f632d9f093e0ba995b277355103e517 (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
--TEST--
Bug #71028 (Undefined index with ArrayIterator)
--FILE--
<?php
function cast(&$a) {
		$a = (int)$a;
}

$a = new ArrayIterator;
$a[-1] = 123;

$b = "-1";
cast($b);

var_dump(isset($a[$b]));
$a[$b] = "okey";
var_dump($a[$b]);
unset($a[$b]);
var_dump(isset($a[$b]));
?>
--EXPECT--
bool(true)
string(4) "okey"
bool(false)