original_string: public static function secondsToTime($seconds)
    {
      $dtF = new DateTime('@0');
      $dtT = new DateTime("@$seconds");
      $res = $dtF->diff($dtT);
      
      $days    = $res->format('%a');
      $hours   = $res->format('%h');
      $minutes = $res->format('%i');
      $seconds = $res->format('%s');
      
      $str = [];
      if ( intval($days) > 0 ){
        $str[] = $days.' '.($days===1?'day':'days');
      }
      if ( intval($hours) > 0 ){
        $str[] = $hours.' '.($hours===1?'hour':'hours');
      }
      if ( intval($minutes) > 0 ){
        $str[] = $minutes.' '.($minutes===1?'minute':'minutes');
      }
      if ( intval($seconds) > 0 ){
        $str[] = $seconds.' '.($seconds===1?'second':'seconds');
      }
      
      return implode(' ', $str);
    }
code: public static function secondsToTime($seconds)
    {
      $dtF = new DateTime('@0');
      $dtT = new DateTime("@$seconds");
      $res = $dtF->diff($dtT);
      
      $days    = $res->format('%a');
      $hours   = $res->format('%h');
      $minutes = $res->format('%i');
      $seconds = $res->format('%s');
      
      $str = [];
      if ( intval($days) > 0 ){
        $str[] = $days.' '.($days===1?'day':'days');
      }
      if ( intval($hours) > 0 ){
        $str[] = $hours.' '.($hours===1?'hour':'hours');
      }
      if ( intval($minutes) > 0 ){
        $str[] = $minutes.' '.($minutes===1?'minute':'minutes');
      }
      if ( intval($seconds) > 0 ){
        $str[] = $seconds.' '.($seconds===1?'second':'seconds');
      }
      
      return implode(' ', $str);
    }
code_tokens: public static function secondsToTime ( $ seconds ) { $ dtF = new DateTime ( '@0' ) ; $ dtT = new DateTime ( "@$seconds" ) ; $ res = $ dtF -> diff ( $ dtT ) ; $ days = $ res -> format ( '%a' ) ; $ hours = $ res -> format ( '%h' ) ; $ minutes = $ res -> format ( '%i' ) ; $ seconds = $ res -> format ( '%s' ) ; $ str = [ ] ; if ( intval ( $ days ) > 0 ) { $ str [ ] = $ days . ' ' . ( $ days === 1 ? 'day' : 'days' ) ; } if ( intval ( $ hours ) > 0 ) { $ str [ ] = $ hours . ' ' . ( $ hours === 1 ? 'hour' : 'hours' ) ; } if ( intval ( $ minutes ) > 0 ) { $ str [ ] = $ minutes . ' ' . ( $ minutes === 1 ? 'minute' : 'minutes' ) ; } if ( intval ( $ seconds ) > 0 ) { $ str [ ] = $ seconds . ' ' . ( $ seconds === 1 ? 'second' : 'seconds' ) ; } return implode ( ' ' , $ str ) ; }
docstring: Convert second to readable format
  @param   int   $seconds  Number of seconds
  @return   string The readable time
docstring_tokens: Convert second to readable format