1--TEST--
2Test strftime() function : usage variation - Checking week 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      'The ISO 8601:1988 week number' => "%V",
15      'Weekday as decimal' => "%u",
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--The ISO 8601:1988 week number--
31
32Deprecated: Function strftime() is deprecated in %s on line %d
33string(2) "%d"
34
35Deprecated: Function strftime() is deprecated in %s on line %d
36string(2) "32"
37
38--Weekday as decimal--
39
40Deprecated: Function strftime() is deprecated in %s on line %d
41string(1) "%d"
42
43Deprecated: Function strftime() is deprecated in %s on line %d
44string(1) "5"
45