Help for this page

Select Code to Download


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