mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
WS and added missing output.
It seems this bug is fixed in latest version at least.
This commit is contained in:
parent
2c4b6fff6d
commit
7cacf9713d
1 changed files with 6 additions and 4 deletions
|
@ -13,7 +13,7 @@ print "Correct - with inner loop reset.\n";
|
||||||
while(list(,$o) = each($arrayOuter)){
|
while(list(,$o) = each($arrayOuter)){
|
||||||
reset($arrayInner);
|
reset($arrayInner);
|
||||||
while(list(,$i) = each($arrayInner)){
|
while(list(,$i) = each($arrayInner)){
|
||||||
print "inloop $i for $o\n";
|
print "inloop $i for $o\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reset($arrayOuter);
|
reset($arrayOuter);
|
||||||
|
@ -23,7 +23,7 @@ print "What happens without inner loop reset.\n";
|
||||||
|
|
||||||
while(list(,$o) = each($arrayOuter)){
|
while(list(,$o) = each($arrayOuter)){
|
||||||
while(list(,$i) = each($arrayInner)){
|
while(list(,$i) = each($arrayInner)){
|
||||||
print "inloop $i for $o\n";
|
print "inloop $i for $o\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reset($arrayOuter);
|
reset($arrayOuter);
|
||||||
|
@ -34,7 +34,7 @@ print "What happens without inner loop reset but copy.\n";
|
||||||
while(list(,$o) = each($arrayOuter)){
|
while(list(,$o) = each($arrayOuter)){
|
||||||
$placeholder = $arrayInner;
|
$placeholder = $arrayInner;
|
||||||
while(list(,$i) = each($arrayInner)){
|
while(list(,$i) = each($arrayInner)){
|
||||||
print "inloop $i for $o\n";
|
print "inloop $i for $o\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reset($arrayOuter);
|
reset($arrayOuter);
|
||||||
|
@ -45,7 +45,7 @@ print "What happens with inner loop reset over copy.\n";
|
||||||
while(list(,$o) = each($arrayOuter)){
|
while(list(,$o) = each($arrayOuter)){
|
||||||
$placeholder = $arrayInner;
|
$placeholder = $arrayInner;
|
||||||
while(list(,$i) = each($placeholder)){
|
while(list(,$i) = each($placeholder)){
|
||||||
print "inloop $i for $o\n";
|
print "inloop $i for $o\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reset($arrayOuter);
|
reset($arrayOuter);
|
||||||
|
@ -63,6 +63,8 @@ inloop 1 for key1
|
||||||
What happens without inner loop reset but copy.
|
What happens without inner loop reset but copy.
|
||||||
inloop 0 for key1
|
inloop 0 for key1
|
||||||
inloop 1 for key1
|
inloop 1 for key1
|
||||||
|
inloop 0 for key2
|
||||||
|
inloop 1 for key2
|
||||||
What happens with inner loop reset over copy.
|
What happens with inner loop reset over copy.
|
||||||
inloop 0 for key1
|
inloop 0 for key1
|
||||||
inloop 1 for key1
|
inloop 1 for key1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue