File "ForLoopWithTestFunctionCallUnitTest.inc"

Full Path: /home/warrior1/public_html/wp-content/themes/storefront/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.inc
File size: 261 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

$a = array(1, 2, 3, 4);
for ($i = 0; $i < count($a); $i++) {
    $a[$i] *= $i;
}

for ($i = 0, $c = sizeof($a); $i < $c; ++$i) {
    $a[$i] *= $i;
}

$it = new ArrayIterator($a);
for ($it->rewind(); $it->valid(); $it->next()) {
    echo $it->current();
}