original_string: public function i18nFormat($format = null, $timezone = null, $locale = null)
      {
          if ($format === Time::UNIX_TIMESTAMP_FORMAT) {
              return $this->getTimestamp();
          }
  
          $time = $this;
  
          if ($timezone) {
              // Handle the immutable and mutable object cases.
              $time = clone $this;
              $time = $time->timezone($timezone);
          }
  
          $format = $format !== null ? $format : static::$_toStringFormat;
          $locale = $locale ?: static::$defaultLocale;
  
          return $this->_formatObject($time, $format, $locale);
      }
code: public function i18nFormat($format = null, $timezone = null, $locale = null)
      {
          if ($format === Time::UNIX_TIMESTAMP_FORMAT) {
              return $this->getTimestamp();
          }
  
          $time = $this;
  
          if ($timezone) {
              // Handle the immutable and mutable object cases.
              $time = clone $this;
              $time = $time->timezone($timezone);
          }
  
          $format = $format !== null ? $format : static::$_toStringFormat;
          $locale = $locale ?: static::$defaultLocale;
  
          return $this->_formatObject($time, $format, $locale);
      }
code_tokens: public function i18nFormat ( $ format = null , $ timezone = null , $ locale = null ) { if ( $ format === Time :: UNIX_TIMESTAMP_FORMAT ) { return $ this -> getTimestamp ( ) ; } $ time = $ this ; if ( $ timezone ) { // Handle the immutable and mutable object cases. $ time = clone $ this ; $ time = $ time -> timezone ( $ timezone ) ; } $ format = $ format !== null ? $ format : static :: $ _toStringFormat ; $ locale = $ locale ? : static :: $ defaultLocale ; return $ this -> _formatObject ( $ time , $ format , $ locale ) ; }
docstring: Returns a formatted string for this time object using the preferred format and
  language for the specified locale.
  
  It is possible to specify the desired format for the string to be displayed.
  You can either pass `IntlDateFormatter` constants as the first argument of this
  function, or pass a full ICU date formatting string as specified in the following
  resource: http://www.icu-project.org/apiref/icu4c/classSimpleDateFormat.html#details.
  
  Additional to `IntlDateFormatter` constants and date formatting string you can use
  Time::UNIX_TIMESTAMP_FORMAT to get a unix timestamp
  
  ### Examples
  
  ```
  $time = new Time('2014-04-20 22:10');
  $time->i18nFormat(); // outputs '4/20/14, 10:10 PM' for the en-US locale
  $time->i18nFormat(\IntlDateFormatter::FULL); // Use the full date and time format
  $time->i18nFormat([\IntlDateFormatter::FULL, \IntlDateFormatter::SHORT]); // Use full date but short time format
  $time->i18nFormat('yyyy-MM-dd HH:mm:ss'); // outputs '2014-04-20 22:10'
  $time->i18nFormat(Time::UNIX_TIMESTAMP_FORMAT); // outputs '1398031800'
  ```
  
  If you wish to control the default format to be used for this method, you can alter
  the value of the static `Time::$defaultLocale` variable and set it to one of the
  possible formats accepted by this function.
  
  You can read about the available IntlDateFormatter constants at
  https://secure.php.net/manual/en/class.intldateformatter.php
  
  If you need to display the date in a different timezone than the one being used for
  this Time object without altering its internal state, you can pass a timezone
  string or object as the second parameter.
  
  Finally, should you need to use a different locale for displaying this time object,
  pass a locale string as the third parameter to this function.
  
  ### Examples
  
  ```
  $time = new Time('2014-04-20 22:10');
  $time->i18nFormat(null, null, 'de-DE');
  $time->i18nFormat(\IntlDateFormatter::FULL, 'Europe/Berlin', 'de-DE');
  ```
  
  You can control the default locale to be used by setting the static variable
  `Time::$defaultLocale` to a valid locale string. If empty, the default will be
  taken from the `intl.default_locale` ini config.
  
  @param string|int|null $format Format string.
  @param string|\DateTimeZone|null $timezone Timezone string or DateTimeZone object
  in which the date will be displayed. The timezone stored for this object will not
  be changed.
  @param string|null $locale The locale name in which the date should be displayed (e.g. pt-BR)
  @return string|int Formatted and translated date string
docstring_tokens: Returns a formatted string for this time object using the preferred format and language for the specified locale .