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