← All docs

gmstrftime()

Formats a UTC timestamp with locale-aware strftime specifiers. Deprecated since PHP 8.1.

gmstrftime()

function gmstrftime(string $format, ?int $timestamp = null): mixed

Formats a UTC timestamp with locale-aware strftime specifiers. Deprecated since PHP 8.1.

Parameters:

  • $format (string)
  • $timestamp (?int), default null, optional

Returns: mixed

Availability

  • Compiled (AOT): supported through the Elephc compiler.
  • eval() (magician interpreter): supported through the procedural date/time alias dispatcher.

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how gmstrftime is implemented in the compiler, see the internals page.