strftime_variation18.phpt 990 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. Test strftime() function : usage variation - Checking day related formats which are supported other than on Windows.
  3. --SKIPIF--
  4. <?php
  5. if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
  6. die("skip Test is not valid for Windows");
  7. }
  8. ?>
  9. --FILE--
  10. <?php
  11. echo "*** Testing strftime() : usage variation ***\n";
  12. // Initialise function arguments not being substituted (if any)
  13. setlocale(LC_ALL, "en_US");
  14. date_default_timezone_set("Asia/Calcutta");
  15. $timestamp = mktime(8, 8, 8, 8, 8, 2008);
  16. echo "\n-- Testing strftime() function with Day of the month as decimal single digit format --\n";
  17. $format = "%e";
  18. var_dump( strftime($format) );
  19. var_dump( strftime($format, $timestamp) );
  20. ?>
  21. --EXPECTF--
  22. *** Testing strftime() : usage variation ***
  23. -- Testing strftime() function with Day of the month as decimal single digit format --
  24. Deprecated: Function strftime() is deprecated in %s on line %d
  25. string(%d) "%s"
  26. Deprecated: Function strftime() is deprecated in %s on line %d
  27. string(2) " 8"