1--TEST--
2Test strftime() function : usage variation - Checking date related formats which was not supported on Windows before VC14.
3--FILE--
4<?php
5echo "*** Testing strftime() : usage variation ***\n";
6
7// Initialise function arguments not being substituted (if any)
8setlocale(LC_ALL, "C");
9date_default_timezone_set("Asia/Calcutta");
10$timestamp = mktime(8, 8, 8, 8, 8, 2008);
11
12//array of values to iterate over
13$inputs = array(
14      'Century number' => "%C",
15      'Month Date Year' => "%D",
16      'Year with century' => "%G",
17      'Year without century' => "%g",
18);
19
20// loop through each element of the array for timestamp
21
22foreach($inputs as $key =>$value) {
23      echo "\n--$key--\n";
24      var_dump( strftime($value) );
25      var_dump( strftime($value, $timestamp) );
26}
27
28?>
29--EXPECTF--
30*** Testing strftime() : usage variation ***
31
32--Century number--
33string(2) "20"
34string(2) "20"
35
36--Month Date Year--
37string(%d) "%d/%d/%d"
38string(8) "08/08/08"
39
40--Year with century--
41string(4) "%d"
42string(4) "2008"
43
44--Year without century--
45string(2) "%d"
46string(2) "08"
47