Annotation of embedaddon/php/ext/date/tests/idate_variation3.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test idate() function : usage variation - Passing higher positive and negetive float values to timestamp.
! 3: --FILE--
! 4: <?php
! 5: /* Prototype : int idate(string format [, int timestamp])
! 6: * Description: Format a local time/date as integer
! 7: * Source code: ext/date/php_date.c
! 8: * Alias to functions:
! 9: */
! 10:
! 11: echo "*** Testing idate() : usage variation ***\n";
! 12:
! 13: // Initialise function arguments not being substituted (if any)
! 14: $format = 'Y';
! 15: date_default_timezone_set("Asia/Calcutta");
! 16:
! 17: echo "\n-- Testing idate() function with float 12.3456789000e10 to timestamp --\n";
! 18: $timestamp = 12.3456789000e10;
! 19: var_dump( idate($format, $timestamp) );
! 20:
! 21: echo "\n-- Testing idate() function with float -12.3456789000e10 to timestamp --\n";
! 22: $timestamp = -12.3456789000e10;
! 23: var_dump( idate($format, $timestamp) );
! 24:
! 25: ?>
! 26: ===DONE===
! 27: --EXPECTREGEX--
! 28: \*\*\* Testing idate\(\) : usage variation \*\*\*
! 29:
! 30: -- Testing idate\(\) function with float 12.3456789000e10 to timestamp --
! 31: int\((1935|5882)\)
! 32:
! 33: -- Testing idate\(\) function with float -12.3456789000e10 to timestamp --
! 34: int\((2004|1901|-1943)\)
! 35: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>