PHP Classes

File: vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.inc

Recommend this page to a friend!
  Classes of milenmk   Simple PHP Password Manager   vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.inc   Download  
File: vendor/squizlabs/php_codesniffer/src/Standards/Generic/Tests/CodeAnalysis/ForLoopWithTestFunctionCallUnitTest.inc
Role: Example script
Content type: text/plain
Description: Example script
Class: Simple PHP Password Manager
Application to store and retrieve user password
Author: By
Last change:
Date: 1 year ago
Size: 261 bytes
 

Contents

Class file image Download
<?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();
}