From:             phocis at gmail dot com
Operating system: BSD
PHP version:      5.2.6
PHP Bug Type:     Date/time related
Bug description:  strtotime returns time() with any string that begins with 
'eat'

Description:
------------
Strtotime returns time() with any string that begins with 'eat'

While this is related to: http://bugs.php.net/bug.php?id=43960

It is not exactly the same.

Reproduce code:
---------------
var_dump(strtotime('10 September 2000'));
var_dump(strtotime('10 September 2000 asdfasdfasdf'));
var_dump(strtotime('asdfasdfasdf 10 September 2000'));


var_dump(strtotime('eat'));
var_dump(strtotime('eat asdfasdfasdf'));
var_dump(strtotime('asdfasdfasdf eat'));

var_dump(strtotime('EAT'));

Expected result:
----------------
int(968569200) # 10 sept 200
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)


Actual result:
--------------
int(968569200) # 10 sept 200
bool(false)
bool(false)
int(1220360063) # time()
int(1220360063) # time()
bool(false)
int(1220360063) # time()


-- 
Edit bug report at http://bugs.php.net/?id=45977&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45977&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45977&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45977&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45977&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45977&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45977&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45977&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45977&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45977&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45977&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45977&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45977&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45977&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45977&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45977&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45977&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45977&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45977&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45977&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45977&r=mysqlcfg

Reply via email to