1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/spl/tests/bug71028.phpt
2020-02-03 22:52:20 +01:00

25 lines
333 B
PHP

--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)