1--TEST--
2Test strftime() function : usage variation - Checking newline and tab 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 strftime() : usage variation ***\n";
12
13// Initialise function arguments not being substituted (if any)
14setlocale(LC_ALL, "en_US");
15date_default_timezone_set("Asia/Calcutta");
16$timestamp = mktime(8, 8, 8, 8, 8, 2008);
17
18//array of values to iterate over
19$inputs = array(
20      'Newline character' => "%n",
21      'Tab character' => "%t"
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( strftime($value) );
29      var_dump( strftime($value, $timestamp) );
30}
31
32?>
33--EXPECTF--
34*** Testing strftime() : usage variation ***
35
36--Newline character--
37
38Deprecated: Function strftime() is deprecated in %s on line %d
39string(1) "
40"
41
42Deprecated: Function strftime() is deprecated in %s on line %d
43string(1) "
44"
45
46--Tab character--
47
48Deprecated: Function strftime() is deprecated in %s on line %d
49string(1) "%r\s%r"
50
51Deprecated: Function strftime() is deprecated in %s on line %d
52string(1) "%r\s%r"
53