repl.it
@maniero/

ConversionTime.php

PHP Web Server

No description

fork
loading
Files
  • index.php
index.php
1
2
3
4
5
6
7
8
<?php
$total = 685;
$horas = floor($total / 3600);
$minutos = floor(($total - ($horas * 3600)) / 60);
$segundos = floor($total % 60);
echo $horas . ":" . $minutos . ":" . $segundos;

//https://pt.stackoverflow.com/q/75990/101