Function __global->gmdate

Definitions

sources_custom/phpstub.php

  • Format a GMT/UTC date/time (uses different format to 'date' function).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$format string No No required parameter N/A N/A The 'gm' format string
$timestamp ?TIME No No Null N/A N/A Timestamp to use (null: now)

Returns

  • The formatted string
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Format a GMT/UTC date/time (uses different format to 'date' function).
 *
 * @param  string $format The 'gm' format string
 * @param  ?TIME $timestamp Timestamp to use (null: now)
 * @return string The formatted string
 */

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