fork download
  1. <?php
  2. $low = 1.5;
  3. $high = 2.999999999999999;
  4. $step = 0.3;
  5. printf("Low=%.15f High=%.15f Step=%.15f\n", $low, $high, $step);
  6. print_r(range($low, $high, $step));
  7. ?>
Success #stdin #stdout 0.02s 13064KB
stdin
Standard input is empty
stdout
Low=1.500000000000000 High=2.999999999999999 Step=0.300000000000000
Array
(
    [0] => 1.5
    [1] => 1.8
    [2] => 2.1
    [3] => 2.4
    [4] => 2.7
    [5] => 3
)