1--TEST-- 2Test strftime() function : usage variation - Checking large positive and negative float values to timestamp. 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 11echo "*** Testing strftime() : usage variation ***\n"; 12 13// Initialise function arguments not being substituted (if any) 14setlocale(LC_ALL, "en_US"); 15date_default_timezone_set("UTC"); 16$format = '%b %d %Y %H:%M:%S'; 17 18echo "\n-- Testing strftime() function with float 12.3456789000e10 to timestamp --\n"; 19$timestamp = 12.3456789000e10; 20var_dump( strftime($format, $timestamp) ); 21 22echo "\n-- Testing strftime() function with float -12.3456789000e10 to timestamp --\n"; 23$timestamp = -12.3456789000e10; 24var_dump( strftime($format, $timestamp) ); 25 26?> 27===DONE=== 28--EXPECTREGEX-- 29\*\*\* Testing strftime\(\) : usage variation \*\*\* 30 31-- Testing strftime\(\) function with float 12.3456789000e10 to timestamp -- 32string\(\d*\)\s"Mar\s(26|11)\s(1935|5882)\s(04|00):(50|30):(16|00)" 33 34-- Testing strftime\(\) function with float -12.3456789000e10 to timestamp -- 35string\(\d*\)\s"(Oct|Dec)\s(08|13|22)\s(2004|1901|-1943)\s(19|20|23):(09|45|30):(44|52|00)" 36===DONE=== 37