2 Test strftime() function : usage variation - Passing month related format strings to format argument.
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
11 echo "*** Testing strftime() : usage variation ***\n";
13 date_default_timezone_set("Asia/Calcutta");
14 // Initialise function arguments not being substituted (if any)
15 $timestamp = mktime(8, 8, 8, 8, 8, 2008);
17 //array of values to iterate over
19 'Abbreviated month name' => "%b",
20 'Full month name' => "%B",
21 'Month as decimal' => "%m",
24 // loop through each element of the array for timestamp
26 foreach($inputs as $key =>$value) {
28 var_dump( strftime($value) );
29 var_dump( strftime($value, $timestamp) );
35 *** Testing strftime() : usage variation ***
37 --Abbreviated month name--