1--TEST--
2Test idate() function : usage variation - Passing supported Time format characters to format argument.
3--FILE--
4<?php
5echo "*** Testing idate() : usage variation ***\n";
6
7// Initialise function arguments not being substituted (if any)
8date_default_timezone_set("Asia/Calcutta");
9
10//array of values to iterate over
11$inputs = array(
12
13      'Internet Time' => 'B',
14      '12 hour format' => 'h',
15      '24 hour format' => 'H',
16      'Minutes' => 'i',
17      'DST Activated' => 'I',
18      'Seconds' => 's',
19      'Seconds since Unix Epoch' => 'U',
20      'Time zone offset' => 'Z'
21);
22
23// loop through each element of the array for timestamp
24foreach($inputs as $key =>$value) {
25      echo "\n--$key--\n";
26      var_dump( idate($value) );
27};
28?>
29--EXPECTF--
30*** Testing idate() : usage variation ***
31
32--Internet Time--
33int(%d)
34
35--12 hour format--
36int(%d)
37
38--24 hour format--
39int(%d)
40
41--Minutes--
42int(%d)
43
44--DST Activated--
45int(%d)
46
47--Seconds--
48int(%d)
49
50--Seconds since Unix Epoch--
51int(%d)
52
53--Time zone offset--
54int(%d)
55