1--TEST--
2Test gmdate() function : usage variation - Passing Month format options to format argument.
3--FILE--
4<?php
5/* Prototype  : string gmdate(string format [, long timestamp])
6 * Description: Format a GMT date/time
7 * Source code: ext/date/php_date.c
8 * Alias to functions:
9 */
10
11echo "*** Testing gmdate() : usage variation ***\n";
12
13// Initialise all required variables
14date_default_timezone_set('UTC');
15$timestamp = mktime(8, 8, 8, 8, 8, 2008);
16
17echo "\n-- Testing gmdate() function with full textual representation of month format --\n";
18var_dump( gmdate('F') );
19var_dump( gmdate('F', $timestamp) );
20
21echo "\n-- Testing gmdate() function with numeric representation of month format --\n";
22var_dump( gmdate('m') );
23var_dump( gmdate('m', $timestamp) );
24
25echo "\n-- Testing gmdate() function with short textual representation of month format --\n";
26var_dump( gmdate('M') );
27var_dump( gmdate('M', $timestamp) );
28
29echo "\n-- Testing gmdate() function with numeric representation of month without leading zeros format --\n";
30var_dump( gmdate('n') );
31var_dump( gmdate('n', $timestamp) );
32
33echo "\n-- Testing gmdate() function with number of days in a month format --\n";
34var_dump( gmdate('t') );
35var_dump( gmdate('t', $timestamp) );
36
37?>
38===DONE===
39--EXPECTF--
40*** Testing gmdate() : usage variation ***
41
42-- Testing gmdate() function with full textual representation of month format --
43string(%d) "%s"
44string(6) "August"
45
46-- Testing gmdate() function with numeric representation of month format --
47string(%d) "%d"
48string(2) "08"
49
50-- Testing gmdate() function with short textual representation of month format --
51string(%d) "%s"
52string(3) "Aug"
53
54-- Testing gmdate() function with numeric representation of month without leading zeros format --
55string(%d) "%d"
56string(1) "8"
57
58-- Testing gmdate() function with number of days in a month format --
59string(%d) "%d"
60string(2) "31"
61===DONE===
62