Annotation of embedaddon/php/ext/date/tests/strftime_variation8.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test strftime() function : usage variation - Passing literal related strings to format argument.
                      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: 
                     11: echo "*** Testing strftime() : usage variation ***\n";
                     12: 
                     13: // Initialise function arguments not being substituted (if any)
                     14: setlocale(LC_ALL, "en_US");
                     15: date_default_timezone_set("Asia/Calcutta");
                     16: $timestamp = mktime(8, 8, 8, 8, 8, 2008);
                     17: $format = "%%";
                     18: 
                     19: echo "\n-- Testing strftime() function with a literal % character to format --\n";
                     20: var_dump( strftime($format) );
                     21: var_dump( strftime($format, $timestamp) );
                     22: 
                     23: ?>
                     24: ===DONE===
                     25: --EXPECTF--
                     26: *** Testing strftime() : usage variation ***
                     27: 
                     28: -- Testing strftime() function with a literal % character to format --
                     29: string(1) "%"
                     30: string(1) "%"
                     31: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>