strftime_variation8.phpt 818 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Test strftime() function : usage variation - Passing literal related strings to format argument.
  3. --FILE--
  4. <?php
  5. echo "*** Testing strftime() : usage variation ***\n";
  6. // Initialise function arguments not being substituted (if any)
  7. setlocale(LC_ALL, "en_US");
  8. date_default_timezone_set("Asia/Calcutta");
  9. $timestamp = mktime(8, 8, 8, 8, 8, 2008);
  10. $format = "%%";
  11. echo "\n-- Testing strftime() function with a literal % character to format --\n";
  12. var_dump( strftime($format) );
  13. var_dump( strftime($format, $timestamp) );
  14. ?>
  15. --EXPECTF--
  16. *** Testing strftime() : usage variation ***
  17. -- Testing strftime() function with a literal % character to format --
  18. Deprecated: Function strftime() is deprecated in %s on line %d
  19. string(1) "%"
  20. Deprecated: Function strftime() is deprecated in %s on line %d
  21. string(1) "%"