note 77116 deleted from function.strtotime by danbrown
| From: | danbrown@php.net | Date: | Mon, 18 May 2009 02:23:48 +0000 |
| Subject: | note 77116 deleted from function.strtotime by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155651@lists.php.net to get a copy of this message | ||
Note Submitter: JustinB at at at harvest dot org
----
@smartalco:
Since the first day of a month is always the first (unless I missed something in History), you could
save yourself some overhead from the second strtotime() by forcing the day manually:
<?php
echo date('l, F jS Y', strtotime('August 1 2007'));
// Outputs "Wednesday, August 1st 2007"
?>
While it's a relatively minor performance difference in a small script, it would be compounded
significantly in larger applications or loops.