Bug #65623 [NEW]: BC change: strtotime() returns non-false for certain integer input values
| From: | mfischer@php.net | Date: | Thu, 05 Sep 2013 14:20:19 +0000 |
| Subject: | Bug #65623 [NEW]: BC change: strtotime() returns non-false for certain integer input values | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-181440@lists.php.net to get a copy of this message | ||
From: mfischer
Operating system: Linux
PHP version: 5.4.19
Package: Date/time related
Bug Type: Bug
Bug description:BC change: strtotime() returns non-false for certain integer input values
Description:
------------
strtotime() is described as "Parse about any English textual datetime
description into a Unix timestamp".
In my case I was providing an integer to $time (maybe it's considered
"undefined" behavior) and observed the following behavior: for certain
integer input values, it stopped returned false but actually returned value
for a time.
Test script:
---------------
<?php
var_dump(strtotime(1359366999));
var_dump(strtotime(1359367000));
Expected result:
----------------
bool(false)
bool(false)
Actual result:
--------------
bool(false)
int(190309870776)
--
Edit bug report at https://bugs.php.net/bug.php?id=65623&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65623&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65623&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65623&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65623&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65623&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65623&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65623&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65623&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65623&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65623&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=65623&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=65623&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65623&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65623&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65623&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65623&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65623&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65623&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65623&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65623&r=mysqlcfg