gmdate_basic.phpt 546 B

12345678910111213141516171819202122
  1. --TEST--
  2. Test gmdate() function : basic functionality
  3. --FILE--
  4. <?php
  5. echo "*** Testing gmdate() : basic functionality ***\n";
  6. // Initialise all required variables
  7. date_default_timezone_set('UTC');
  8. $format = DATE_ISO8601;
  9. $timestamp = mktime(8, 8, 8, 8, 8, 2008);
  10. // Calling gmdate() with all possible arguments
  11. var_dump( gmdate($format, $timestamp) );
  12. // Calling gmdate() with mandatory arguments
  13. var_dump( gmdate($format) );
  14. ?>
  15. --EXPECTF--
  16. *** Testing gmdate() : basic functionality ***
  17. string(24) "2008-08-08T08:08:08+0000"
  18. string(%d) "%s"