/hphp/test/zend/bad/ext/date/tests/mktime-3.php

http://github.com/facebook/hiphop-php · PHP · 20 lines · 19 code · 1 blank · 0 comment · 3 complexity · c6028db29fe7ce8ffa0e75f5cdb78412 MD5 · raw file

  1. <?php
  2. $tzs = array("America/Toronto", "Europe/Oslo");
  3. $years = array(0, 69, 70, 71, 99, 100, 105, 1900, 1901, 1902, 1999, 2000, 2001);
  4. foreach ($tzs as $tz) {
  5. echo $tz, "\n";
  6. date_default_timezone_set($tz);
  7. foreach ($years as $year) {
  8. printf("Y: %4d - ", $year);
  9. $ret = mktime(1, 1, 1, 1, 1, $year);
  10. if ($ret == FALSE) {
  11. echo "out of range\n";
  12. } else {
  13. echo date("F ".DATE_ISO8601, $ret), "\n";
  14. }
  15. }
  16. echo "\n";
  17. }
  18. ?>
  19. ===Done===