gmdate_variation5.phpt 585 B

123456789101112131415161718192021
  1. --TEST--
  2. Test gmdate() function : usage variation - Passing Week representation to format.
  3. --FILE--
  4. <?php
  5. echo "*** Testing gmdate() : usage variation ***\n";
  6. // Initialise all required variables
  7. date_default_timezone_set('UTC');
  8. $timestamp = mktime(8, 8, 8, 8, 8, 2008);
  9. echo "\n-- Testing gmdate() function with ISO-8601 week number of year format --\n";
  10. var_dump( gmdate('W') );
  11. var_dump( gmdate('W', $timestamp) );
  12. ?>
  13. --EXPECTF--
  14. *** Testing gmdate() : usage variation ***
  15. -- Testing gmdate() function with ISO-8601 week number of year format --
  16. string(%d) "%d"
  17. string(2) "32"