From: al dot vazquez at gmail dot com Operating system: Linux PHP version: 5.2.3 PHP Bug Type: Date/time related Bug description: strtotime returns a timestamp for non-time string of pattern '(A|a) .+'
Description: ------------ strtotime return the current timestamp for the values 'A Revolution in Development' and 'a nothing'. Expected return value is false. This seems to be tripped by the first character being the letter 'a' or 'A' followed by a space followed by more text. Reproduce code: --------------- echo strtotime('Ask the Experts'); echo strtotime('A '); echo strtotime('A'); echo strtotime('a '); echo strtotime('a'); echo strtotime('A Revolution in Development'); echo strtotime('a nothing'); Expected result: ---------------- false false false false false false false Actual result: -------------- false false false false false current timestamp current timestamp -- Edit bug report at http://bugs.php.net/?id=41964&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41964&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41964&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41964&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41964&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41964&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41964&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41964&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41964&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41964&r=support Expected behavior: http://bugs.php.net/fix.php?id=41964&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41964&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41964&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41964&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41964&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41964&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41964&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41964&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41964&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41964&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41964&r=mysqlcfg