gmstrftime_variation11.phpt 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --TEST--
  2. Test gmstrftime() function : usage variation - Checking month related formats which are not supported on Windows.
  3. --SKIPIF--
  4. <?php
  5. if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
  6. die("skip Test is valid for Windows");
  7. }
  8. ?>
  9. --FILE--
  10. <?php
  11. /* Prototype : string gmstrftime(string format [, int timestamp])
  12. * Description: Format a GMT/UCT time/date according to locale settings
  13. * Source code: ext/date/php_date.c
  14. * Alias to functions:
  15. */
  16. echo "*** Testing gmstrftime() : usage variation ***\n";
  17. // Initialise function arguments not being substituted (if any)
  18. $timestamp = gmmktime(8, 8, 8, 8, 8, 2008);
  19. setlocale(LC_ALL, "en_US");
  20. date_default_timezone_set("Asia/Calcutta");
  21. echo "\n-- Testing gmstrftime() function with Abbreviated month name format %h --\n";
  22. $format = "%h";
  23. var_dump( gmstrftime($format) );
  24. var_dump( gmstrftime($format, $timestamp) );
  25. ?>
  26. ===DONE===
  27. --EXPECTF--
  28. *** Testing gmstrftime() : usage variation ***
  29. -- Testing gmstrftime() function with Abbreviated month name format %h --
  30. bool(false)
  31. bool(false)
  32. ===DONE===