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--
30
31Deprecated: Function gmstrftime() is deprecated in %s on line %d
32string(%d) "%s"
33
34Deprecated: Function gmstrftime() is deprecated in %s on line %d
35string(3) "Aug"
36
37--Full month name--
38
39Deprecated: Function gmstrftime() is deprecated in %s on line %d
40string(%d) "%s"
41
42Deprecated: Function gmstrftime() is deprecated in %s on line %d
43string(6) "August"
44
45--Month as decimal--
46
47Deprecated: Function gmstrftime() is deprecated in %s on line %d
48string(%d) "%d"
49
50Deprecated: Function gmstrftime() is deprecated in %s on line %d
51string(2) "08"
52