From: fsb at thefsb dot org
Operating system: Mac 10.5.5
PHP version: 5.2.6
PHP Bug Type: Date/time related
Bug description: Inconsistent return values for strtotime('0000-00-00')
Description:
------------
strtotime('0000-00-00') returns int(-62169955200) in a script run by
apache web server and bool(false) when run by the command line.
Reproduce code:
---------------
<?php
var_dump(strtotime('0000-00-00'));
?>
this script outputs int(-62169955200) to the web browser when run as a web
page and bool(false) when run on the command line.
Expected result:
----------------
i would expect the same result from running the function in the two
contexts.
regarding which result strtotime('0000-00-00') should return, i don't
know. both answers seem reasonable to me. it would help if php
documentation would specify the range of dates and unix timestamps that
date and time functions can handle.
Actual result:
--------------
int(-62169955200) in the web page
bool(false) in the command line
--
Edit bug report at http://bugs.php.net/?id=46597&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46597&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46597&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46597&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=46597&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=46597&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=46597&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=46597&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=46597&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=46597&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=46597&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=46597&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46597&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46597&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=46597&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46597&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46597&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=46597&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=46597&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=46597&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=46597&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=46597&r=mysqlcfg
