make test runner work in open source repo
[hiphop-php.git] / hphp / test / zend / bad / ext-date / strftime_variation13.php
blobcc79a791653bde3b5abc0530b9e447eaa362aec9
1 <?php
2 /* Prototype : string strftime(string format [, int timestamp])
3 * Description: Format a local time/date according to locale settings
4 * Source code: ext/date/php_date.c
5 * Alias to functions:
6 */
8 echo "*** Testing strftime() : usage variation ***\n";
10 // Initialise function arguments not being substituted (if any)
11 setlocale(LC_ALL, "en_US");
12 date_default_timezone_set("Asia/Calcutta");
13 $timestamp = mktime(8, 8, 8, 8, 8, 2008);
15 //array of values to iterate over
16 $inputs = array(
17 'Century number' => "%C",
18 'Month Date Year' => "%D",
19 'Year with century' => "%G",
20 'Year without century' => "%g",
23 // loop through each element of the array for timestamp
25 foreach($inputs as $key =>$value) {
26 echo "\n--$key--\n";
27 var_dump( strftime($value) );
28 var_dump( strftime($value, $timestamp) );
32 ===DONE===