Created
February 23, 2019 12:45
-
-
Save ashokrane/cee50978ef8624c229fff97737153618 to your computer and use it in GitHub Desktop.
strtotime() returning blank or empty timestamp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo strtotime( '21-02-2019 10:0' ); // 1550743200 | |
echo '<br>' . strtotime( '21-02-2019 10:00' ); // 1550743200 | |
echo '<br>' . strtotime( '21-02-2019 100' ); // blank, thereby results in a date of 1-1-1970 when used in date() | |
echo '<br>' . strtotime( '21-02-2019 1000' ); // 1550743200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment