1--TEST--
2Test gmstrftime() function : usage variation - Checking week related formats which are supported other than on Windows.
3--SKIPIF--
4<?php
5if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
6    die("skip Test is not valid for Windows");
7}
8?>
9--FILE--
10<?php
11echo "*** Testing gmstrftime() : usage variation ***\n";
12
13// Initialise function arguments not being substituted (if any)
14$timestamp = gmmktime(8, 8, 8, 8, 8, 2008);
15setlocale(LC_ALL, "en_US");
16date_default_timezone_set("Asia/Calcutta");
17
18//array of values to iterate over
19$inputs = array(
20      'The ISO 8601:1988 week number' => "%V",
21      'Weekday as decimal' => "%u",
22);
23
24// loop through each element of the array for timestamp
25
26foreach($inputs as $key =>$value) {
27      echo "\n--$key--\n";
28      var_dump( gmstrftime($value) );
29      var_dump( gmstrftime($value, $timestamp) );
30};
31
32?>
33--EXPECTF--
34*** Testing gmstrftime() : usage variation ***
35
36--The ISO 8601:1988 week number--
37string(%d) "%d"
38string(2) "32"
39
40--Weekday as decimal--
41string(%d) "%d"
42string(1) "5"
43