1--TEST--
2Test strftime() function : usage variation - Checking newline and tab formats which was not supported on Windows before VC14.
3--FILE--
4<?php
5/* Prototype  : string strftime(string format [, int timestamp])
6 * Description: Format a local time/date according to locale settings
7 * Source code: ext/date/php_date.c
8 * Alias to functions:
9 */
10
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===DONE===
34--EXPECT--
35*** Testing strftime() : usage variation ***
36
37--Newline character--
38string(1) "
39"
40string(1) "
41"
42
43--Tab character--
44string(1) "	"
45string(1) "	"
46===DONE===
47