Annotation of embedaddon/php/ext/date/tests/gmmktime_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test gmmktime() function : basic functionality
! 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() : basic functionality ***\n";
! 12:
! 13: // Initialise all required variables
! 14: $hour = 8;
! 15: $min = 8;
! 16: $sec = 8;
! 17: $mon = 8;
! 18: $day = 8;
! 19: $year = 2008;
! 20:
! 21: // Calling gmmktime() with all possible arguments
! 22: var_dump( gmmktime($hour, $min, $sec, $mon, $day, $year) );
! 23:
! 24: // Calling gmmktime() with mandatory arguments
! 25: var_dump( gmmktime() );
! 26:
! 27: ?>
! 28: ===DONE===
! 29: --EXPECTF--
! 30: *** Testing gmmktime() : basic functionality ***
! 31: int(1218182888)
! 32:
! 33: Strict Standards: gmmktime(): You should be using the time() function instead in %s on line %d
! 34: int(%d)
! 35: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>