Function __global->localtime

Definitions

sources_custom/phpstub.php

  • Get the local time.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$timestamp ?TIME No No required parameter N/A N/A Timestamp (null: now)
$associative boolean No No False N/A N/A If set to FALSE or not supplied than the array is returned as a regular, numerically indexed array. If the argument is set to TRUE then localtime() is an associative array containing all the different elements of the structure returned by the C function call to localtime.

Returns

  • Components
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the local time.
 *
 * @param  ?TIME $timestamp Timestamp (null: now)
 * @param  boolean $associative If set to FALSE or not supplied than the array is returned as a regular, numerically indexed array. If the argument is set to TRUE then localtime() is an associative array containing all the different elements of the structure returned by the C function call to localtime.
 * @return array Components
 */

function localtime(?int $timestamp, bool $associative = false) : array