gmstrftime_variation12.phpt 986 B

123456789101112131415161718192021222324252627282930313233
  1. --TEST--
  2. Test gmstrftime() function : usage variation - Checking month 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 gmstrftime() : usage variation ***\n";
  12. // Initialise function arguments not being substituted (if any)
  13. $timestamp = gmmktime(8, 8, 8, 8, 8, 2008);
  14. setlocale(LC_ALL, "en_US");
  15. date_default_timezone_set("Asia/Calcutta");
  16. echo "\n-- Testing gmstrftime() function with Abbreviated month name format %h --\n";
  17. $format = "%h";
  18. var_dump( gmstrftime($format) );
  19. var_dump( gmstrftime($format, $timestamp) );
  20. ?>
  21. --EXPECTF--
  22. *** Testing gmstrftime() : usage variation ***
  23. -- Testing gmstrftime() function with Abbreviated month name format %h --
  24. Deprecated: Function gmstrftime() is deprecated in %s on line %d
  25. string(%d) "%s"
  26. Deprecated: Function gmstrftime() is deprecated in %s on line %d
  27. string(3) "Aug"