/hphp/test/zend/bad/ext/date/tests/mktime-3-64bit.php
PHP | 19 lines | 18 code | 1 blank | 0 comment | 3 complexity | e04edb513d24df3590de51eea4116732 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?php
- $tzs = array("America/Toronto", "Europe/Oslo");
- $years = array(0, 69, 70, 71, 99, 100, 101, 105, 110, 1900, 1901, 1902, 1999, 2000, 2001);
- foreach ($tzs as $tz) {
- echo $tz, "\n";
- date_default_timezone_set($tz);
- foreach ($years as $year) {
- printf("Y: %4d - ", $year);
- $ret = mktime(1, 1, 1, 1, 1, $year);
- if ($ret == FALSE) {
- echo "out of range\n";
- } else {
- echo date("F ".DATE_ISO8601, $ret), "\n";
- }
- }
- echo "\n";
- }
- ?>