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

21 lines
330 B
PHP

--TEST--
Bug #69335 (SplArray BC break)
--FILE--
<?php
$a = array(1=>1, 3=>3, 5=>5, 7=>7);
$a = new ArrayObject($a);
foreach ($a as $k => $v) {
var_dump("$k => $v");
if ($k == 3) {
$a['a'] = "?";
}
}
?>
--EXPECT--
string(6) "1 => 1"
string(6) "3 => 3"
string(6) "5 => 5"
string(6) "7 => 7"
string(6) "a => ?"