strftime_basic.phpt 716 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. Test strftime() function : basic functionality
  3. --FILE--
  4. <?php
  5. echo "*** Testing strftime() : basic functionality ***\n";
  6. date_default_timezone_set("Asia/Calcutta");
  7. // Initialise all required variables
  8. $format = '%b %d %Y %H:%M:%S';
  9. $timestamp = mktime(8, 8, 8, 8, 8, 2008);
  10. // Calling strftime() with all possible arguments
  11. var_dump( strftime($format, $timestamp) );
  12. // Calling strftime() with mandatory arguments
  13. var_dump( strftime($format) );
  14. ?>
  15. --EXPECTF--
  16. *** Testing strftime() : basic functionality ***
  17. Deprecated: Function strftime() is deprecated in %s on line %d
  18. string(20) "Aug 08 2008 08:08:08"
  19. Deprecated: Function strftime() is deprecated in %s on line %d
  20. string(%d) "%s %d %d %d:%d:%d"