1--TEST--
2Test gmstrftime() function : usage variation - Passing month related format strings to format argument.
3--FILE--
4<?php
5echo "*** Testing gmstrftime() : usage variation ***\n";
6
7// Initialise function arguments not being substituted (if any)
8$timestamp = gmmktime(8, 8, 8, 8, 8, 2008);
9
10//array of values to iterate over
11$inputs = array(
12      'Abbreviated month name' => "%b",
13      'Full month name' => "%B",
14      'Month as decimal' => "%m",
15);
16
17// loop through each element of the array for timestamp
18
19foreach($inputs as $key =>$value) {
20      echo "\n--$key--\n";
21      var_dump( gmstrftime($value) );
22      var_dump( gmstrftime($value, $timestamp) );
23};
24
25?>
26--EXPECTF--
27*** Testing gmstrftime() : usage variation ***
28
29--Abbreviated month name--
30string(%d) "%s"
31string(3) "Aug"
32
33--Full month name--
34string(%d) "%s"
35string(6) "August"
36
37--Month as decimal--
38string(%d) "%d"
39string(2) "08"
40