by Example
显示下拉菜单
Configuration of timezone_name_from_abbr()
本页面仅提供英文版本。
<?php
/**
* PHP By Example
*
* @copyright 2015 Michel Corne
* @license http://www.opensource.org/licenses/gpl-3.0.html GNU GPL v3
*/
require_once 'models/function_core.php';
/**
* Function configuration
*
* @see docs/function-configuration.txt
*/
class timezone_name_from_abbr extends function_core
{
public $examples = [
"CET",
[
"",
3600,
0
]
];
public $synopsis = 'string timezone_name_from_abbr ( string $abbr [, int $gmtOffset = -1 [, int $isdst = -1 ]] )';
function _get_options_list()
{
$constants = timezone_abbreviations_list();
$constants = array_keys($constants);
$constants = array_diff($constants, range('a', 'z')); // removes one letter time zones
$constants = array_map('strtoupper', $constants);
$options_list = ['abbr' => $constants];
return $options_list;
}
}
帮助
杂项
配置
测试
单元测试
Powered by
PHP 7.1.33 (0.003 s)
2014-2017 Michel Corne