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

1.1       misho       1: --TEST--
                      2: Test gmmktime() function : usage variation - Passing octal and hexadecimal values to arguments.
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])
                      6:  * Description: Get UNIX timestamp for a GMT date 
                      7:  * Source code: ext/date/php_date.c
                      8:  * Alias to functions: 
                      9:  */
                     10: 
                     11: echo "*** Testing gmmktime() : usage variation ***\n";
                     12: 
                     13: // Initialise all required variables
                     14: $hour = 010;
                     15: $min = 010;
                     16: $sec = 010;
                     17: $mon = 010;
                     18: $day = 010;
                     19: $year = 03730;
                     20: 
                     21: echo "\n-- Testing gmmktime() function with supplying octal values to arguments --\n";
                     22: var_dump( gmmktime($hour, $min, $sec, $mon, $day, $year) );
                     23: 
                     24: // Initialise all required variables
                     25: $hour = 0x8;
                     26: $min = 0x8;
                     27: $sec = 0x8;
                     28: $mon = 0x8;
                     29: $day = 0x8;
                     30: $year = 0x7D8;
                     31: 
                     32: echo "\n-- Testing gmmktime() function with supplying hexa decimal values to arguments --\n";
                     33: var_dump( gmmktime($hour, $min, $sec, $mon, $day, $year) );
                     34: ?>
                     35: ===DONE===
                     36: --EXPECTF--
                     37: *** Testing gmmktime() : usage variation ***
                     38: 
                     39: -- Testing gmmktime() function with supplying octal values to arguments --
                     40: int(1218182888)
                     41: 
                     42: -- Testing gmmktime() function with supplying hexa decimal values to arguments --
                     43: int(1218182888)
                     44: ===DONE===

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