1--TEST--
2Test gmstrftime() function : usage variation - Checking newline and tab formats which was not supported on Windows before VC14.
3--FILE--
4<?php
5echo "*** Testing gmstrftime() : usage variation ***\n";
6
7// Initialise function arguments not being substituted (if any)
8$timestamp = gmmktime(8, 8, 8, 8, 8, 2008);
9setlocale(LC_ALL, "C");
10date_default_timezone_set("Asia/Calcutta");
11
12//array of values to iterate over
13$inputs = array(
14      'Newline character' => "%n",
15      'Tab character' => "%t"
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( gmstrftime($value) );
23      var_dump( gmstrftime($value, $timestamp) );
24};
25
26?>
27--EXPECTF--
28*** Testing gmstrftime() : usage variation ***
29
30--Newline character--
31
32Deprecated: Function gmstrftime() is deprecated in %s on line %d
33string(1) "
34"
35
36Deprecated: Function gmstrftime() is deprecated in %s on line %d
37string(1) "
38"
39
40--Tab character--
41
42Deprecated: Function gmstrftime() is deprecated in %s on line %d
43string(1) "	"
44
45Deprecated: Function gmstrftime() is deprecated in %s on line %d
46string(1) "	"
47