public function selectRangeWithInterval(string $name, int $start, int $end, int $interval, int $value = null, array $options = []) : string
{
if ($interval == 0) {
return parent::selectRange($name, $start, $end, $value, $options);
}
$items = [];
$items[$value] = $value;
$startValue = $start;
$endValue = $end;
$interval *= $interval < 0 ? -1 : 1;
if ($start > $end) {
$interval *= $interval > 0 ? -1 : 1;
$startValue = $end;
$endValue = $start;
}
for ($i = $startValue; $i < $endValue; $i += $interval) {
$items[$i . ""] = $i;
}
$items[$endValue] = $endValue;
return $this->select($name, $items, $value, $options);
}