xref: /PHP-8.0/ext/date/tests/gmdate_basic.phpt (revision b5c7a83d)
1--TEST--
2Test gmdate() function : basic functionality
3--FILE--
4<?php
5echo "*** Testing gmdate() : basic functionality ***\n";
6
7// Initialise all required variables
8date_default_timezone_set('UTC');
9$format = DATE_ISO8601;
10$timestamp = mktime(8, 8, 8, 8, 8, 2008);
11
12// Calling gmdate() with all possible arguments
13var_dump( gmdate($format, $timestamp) );
14
15// Calling gmdate() with mandatory arguments
16var_dump( gmdate($format) );
17
18?>
19--EXPECTF--
20*** Testing gmdate() : basic functionality ***
21string(24) "2008-08-08T08:08:08+0000"
22string(%d) "%s"
23