Annotation of embedaddon/php/ext/date/tests/mktime_basic1.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test mktime() function : basic functionality
! 3: --FILE--
! 4: <?php
! 5: /* Prototype : int mktime ([ int $hour= date("H") [, int $minute= date("i") [, int $second= date("s") [, int $month= date("n") [, int $day= date("j") [, int $year= date("Y") [, int $is_dst= -1 ]]]]]]] )
! 6: * Description: Get Unix timestamp for a date
! 7: * Source code: ext/date/php_date.c
! 8: * Alias to functions:
! 9: */
! 10: error_reporting(E_ALL | E_STRICT);
! 11:
! 12: //Set the default time zone
! 13: date_default_timezone_set("Europe/London");
! 14:
! 15: echo "*** Testing DateTime::modify() : basic functionality ***\n";
! 16:
! 17: $hour = 10;
! 18: $minute = 30;
! 19: $sec = 45;
! 20: $month = 7;
! 21: $day = 2;
! 22: $year = 1963;
! 23: $is_dst = 0;
! 24:
! 25: var_dump( mktime($hour) );
! 26: var_dump( mktime($hour, $minute) );
! 27: var_dump( mktime($hour, $minute, $sec) );
! 28: var_dump( mktime($hour, $minute, $sec, $month) );
! 29: var_dump( mktime($hour, $minute, $sec, $month, $day) );
! 30: var_dump( mktime($hour, $minute, $sec, $month, $day, $year) );
! 31: var_dump( mktime($hour, $minute, $sec, $month, $day, $year, $is_dst) );
! 32:
! 33: ?>
! 34: ===DONE===
! 35: --EXPECTF--
! 36: *** Testing DateTime::modify() : basic functionality ***
! 37: int(%i)
! 38: int(%i)
! 39: int(%i)
! 40: int(%i)
! 41: int(%i)
! 42: int(%i)
! 43:
! 44: Deprecated: mktime(): The is_dst parameter is deprecated in %s on line %d
! 45: int(%i)
! 46: ===DONE===
! 47:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>