Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2889581
reused-iterators.lint-test
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
951 B
Referenced Files
None
Subscribers
None
reused-iterators.lint-test
View Options
<?php
for ($ii = 0; $ii < $len; $ii++) {
foreach ($list as $ii => $jj) {
// Reuse of $ii.
}
}
for ($jj = 0; $jj < $len; $jj++) {
foreach ($list as $jj) {
// Reuse of $jj.
}
}
for ($ii = 0; $ii < $len; $ii++) {
foreach ($list as $ii => &$jj) {
// Reuse of $ii.
}
}
for ($jj = 0; $jj < $len; $jj++) {
foreach ($list as &$jj) {
// Reuse of $jj (by reference).
}
}
for ($ii = 0; $ii < $len; $ii++) {
for ($jj = 0; $jj < $len; $jj++) {
foreach ($list as $kk) {
// No reuse.
}
}
}
for ($ii = 0; $ii < $len; $ii++) {
for ($ii = 0; $ii < $len; $ii++) {
// Reuse of $ii, pure for loops.
}
}
for ($ii = 0; $ii < $len; $ii++) {
for ($jj = $ii; $jj < $jjlen; $jj++) {
// No reuse.
}
}
foreach ($list as $thing) {
for ($thing = 0; $thing < $len; $thing++) {
// Reuse of $thing, for within foreach.
}
}
~~~~~~~~~~
error:4:11
error:10:11
error:16:11
error:22:11
error:36:7
error:48:7
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Jan 19, 12:22 (3 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1124510
Default Alt Text
reused-iterators.lint-test (951 B)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment