mirror of
https://github.com/php/php-src.git
synced 2024-10-04 16:26:13 +00:00
31 lines
740 B
PHP
31 lines
740 B
PHP
--TEST--
|
|
Test gmdate() function : basic functionality
|
|
--FILE--
|
|
<?php
|
|
/* Prototype : string gmdate(string format [, long timestamp])
|
|
* Description: Format a GMT date/time
|
|
* Source code: ext/date/php_date.c
|
|
* Alias to functions:
|
|
*/
|
|
|
|
echo "*** Testing gmdate() : basic functionality ***\n";
|
|
|
|
// Initialise all required variables
|
|
date_default_timezone_set('UTC');
|
|
$format = DATE_ISO8601;
|
|
$timestamp = mktime(8, 8, 8, 8, 8, 2008);
|
|
|
|
// Calling gmdate() with all possible arguments
|
|
var_dump( gmdate($format, $timestamp) );
|
|
|
|
// Calling gmdate() with mandatory arguments
|
|
var_dump( gmdate($format) );
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
*** Testing gmdate() : basic functionality ***
|
|
unicode(24) "2008-08-08T08:08:08+0000"
|
|
unicode(%d) "%s"
|
|
===DONE===
|