- or download this
for($i = 0; $i <= 10_000; $i++) {
$ary[$i] = init_val($i);
}
- or download this
$idx = 0;
for($i = 0; $i < 10_000; $i += 10) {
...
$ary[$idx++] = init_val($idx);
...rest goes here...
}
- or download this
$x = $y * 16;
$x = $y << 4; #Much faster
- or download this
$y * 26
== $y * 16 + $y * 8 + $y * 2
== $y << 4 + $y << 3 + $y << 1;