Bug #77814 [NEW]: strtotime("L", (string)($y);
| From: | beverlydutoit at gmail dot com | Date: | Thu, 28 Mar 2019 08:44:51 +0000 |
| Subject: | Bug #77814 [NEW]: strtotime("L", (string)($y); | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-220234@lists.php.net to get a copy of this message | ||
From: beverlydutoit at gmail dot com
Operating system: Android
PHP version: 7.1.27
Package: Calendar related
Bug Type: Bug
Bug description:strtotime("L", (string)($y);
Description:
------------
1. ver 7.2.3 ksweb for android app build
2. check for leap year y2k error
3. checkdate works for 2,29, $y reports 1
4. phpinfo() for app default installation
5. huh? whatsa gdb bactrace? :-)
Test script:
---------------
<?php
echo "<p>$ver; $tz</p>";
$y=1970;
for ($y; $y<2020; $y++){
echo $leap = date("L", strtotime((string)($y))) ? "$y=yes; ":"$y=no;
";
echo checkdate(2,29,$y);
echo '; ';
}
?>
Expected result:
----------------
1970=no; ; 1971=no; ; 1972=yes; 1; 1973=no; ; 1974=no; ; 1975=no; ;
1976=yes; 1; 1977=no; ; 1978=no; ; 1979=no; ; 1980=yes; 1; 1981=no; ;
1982=no; ; 1983=no; ; 1984=yes; 1; 1985=no; ; 1986=no; ; 1987=no; ;
1988=yes; 1; 1989=no; ; 1990=no; ; 1991=no; ; 1992=yes; 1; 1993=no; ;
1994=no; ; 1995=no; ; 1996=yes; 1; 1997=no; ; 1998=no; ; 1999=no; ; at
this point i'd want to see 2000=yes; 1; instead of 2000=no; 1; 2001=no;
; 2002=no; ; 2003=no; ; 2004=no; 1; 2005=no; ; 2006=no; ; 2007=no; ;
2008=no; 1; 2009=no; ; 2010=no; ; 2011=no; ; 2012=no; 1; 2013=no; ;
2014=no; ; 2015=no; ; 2016=no; 1; 2017=no; ; 2018=no; ; 2019=no; ; same
for 2004, 2008, 2012, 2016 and 2020
Actual result:
--------------
dunno whatsa bactrace
--
Edit bug report at https://bugs.php.net/bug.php?id=77814&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77814&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77814&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77814&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=77814&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=77814&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=77814&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=77814&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=77814&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=77814&r=support
Expected behavior: https://bugs.php.net/fix.php?id=77814&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=77814&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=77814&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=77814&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77814&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=77814&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=77814&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=77814&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=77814&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=77814&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=77814&r=mysqlcfg