3v4l.org

run code in 300+ PHP versions simultaneously
<?php $horas_totais = 27; $horario_dos_km = 9.3; $getallours = []; $rasteach = round($horas_totais / $horario_dos_km, 1, PHP_ROUND_HALF_UP); $tot = 0; for ($z = 0; $z < $horario_dos_km - 1; $z++) { $tot += $rasteach; $getallours[] = $tot; } $getallours[] = $horas_totais; print_r($getallours);

preferences:
28.49 ms | 405 KiB | 5 Q