Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ctime($t) {
- $s = new DateTime('@0');
- $s->add(new DateInterval($t));
- if (strlen($t)>8)
- return $s->format('g:i:s');
- else
- return $s->format('i:s');
- }
- echo ctime('PT3M44S'); // return: 03:44
Advertisement
Add Comment
Please, Sign In to add comment