Subversion Repositories Applications.framework

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 aurelien 1
<?php
2
 
3
$a = array(1, 2, 3, 4);
4
for ($i = 0; $i < count($a); $i++) {
5
    $a[$i] *= $i;
6
}
7
 
8
for ($i = 0, $c = sizeof($a); $i < $c; ++$i) {
9
    $a[$i] *= $i;
10
}
11
 
12
$it = new ArrayIterator($a);
13
for ($it->rewind(); $it->valid(); $it->next()) {
14
    echo $it->current();
15
}