php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&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?qSXzG'ay

PAL.C.T MINI SHELL
files >> /opt/php-7.0.1/tests/lang/
upload
files >> //opt/php-7.0.1/tests/lang/foreachLoop.011.phpt

--TEST-- 
Changing from an interable type to a non iterable type during the iteration 
--FILE--
<?php
echo "\nChange from array to non iterable:\n";
$a = array(1,2,3);
$b=&$a;
foreach ($a as $v) {
	var_dump($v);
	$b=1;
}

echo "\nChange from object to non iterable:\n";
$a = new stdClass;
$a->a=1;
$a->b=2;
$b=&$a;
foreach ($a as $v) {
	var_dump($v);
	$b='x';	
}

?>
--EXPECTF--

Change from array to non iterable:
int(1)
int(2)
int(3)

Change from object to non iterable:
int(1)
int(2)
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`