note 72837 deleted from function.strtotime by derick
| From: | derick@php.net | Date: | Sun, 08 Apr 2007 12:56:35 +0000 |
| Subject: | note 72837 deleted from function.strtotime by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-125200@lists.php.net to get a copy of this message | ||
Note Submitter: Caveat Emptor: Strings with "NET"
----
Here is a strange "feature" of this function of which you should be aware:
If you use:
strtotime("NET")
...or...
strtotime("NET1000")
...or a bazillion other strings beginning with "NET"...
strtotime() will actually interpret these as a timestamp! I tested and verified this functionality
on PHP versions:
- Linux, PHP 5.1.6
- Windows, PHP 5.1.2
I have relied on this function to determine if a string is a date (as do many developers), but these
special "NET" strings must be an undocumented "feature," because there is
nothing to be found about it anywhere in the docs or on Google (at least that I can find).