Hi,

Long time no speak!


As part of a quick filter I'm writing I try to interpret free text
strings as dates and textual data.

Sometimes, this goes wrong.

For example, I discovered that some words (or strings beginning with
those words) will return false positives:

e.g.:

[co...@jimmy Search (working)]$ php -r 'var_dump(strtotime("east"));'
int(1270514111)
[co...@jimmy Search (working)]$ php -r 'var_dump(strtotime("west"));'
int(1270488914)
[co...@jimmy Search (working)]$ php -r 'var_dump(strtotime("now"));'
int(1270488928)


The last one is valid! But the other two appear to do much the same thing...

Can anyone think of why this would be valid results before I report this
to the relevant authorities?

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to