If you set number range via variables (eg., range($from, $to)) make sure
you've set type of the variables to integer or your code won't work
with version 4.1.0 and above.
$from = 0;
$to = 7;
foreach(
range((int) $from, (int) $to) as $number ) {
print
"$number\n";
}