Skip to content

Instantly share code, notes, and snippets.

@LeeSaferite
Created July 13, 2016 19:57
Show Gist options
  • Save LeeSaferite/55a029c938f5cc7ce3c06b31049ee4e8 to your computer and use it in GitHub Desktop.
Save LeeSaferite/55a029c938f5cc7ce3c06b31049ee4e8 to your computer and use it in GitHub Desktop.
<?php
function seconds_to_time(int $seconds) : string
{
return sprintf("%d:%02d:%02d", floor($seconds / 3600), (($seconds / 60) % 60), ($seconds % 60));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment