note 126078 added to function.date
| From: | ehsan at chavoshi | Date: | Thu, 13 May 2021 16:44:13 +0000 |
| Subject: | note 126078 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216384@lists.php.net to get a copy of this message | ||
Note that for php version below 8 , if you pass
null to timestamp parameter, it is
considered as 0 .
<?php
//php < 8
time("Y-m-d",null); //return 1970-01-01
time("Y-m-d"); //return current date
//php >= 8
time("Y-m-d",null); //return current date
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 185.129.243.131)
----
Manual Page -- https://php.net/manual/en/function.date.php
Edit -- https://main.php.net/note/edit/126078
Del: integrated -- https://main.php.net/note/delete/126078/integrated
Del: useless -- https://main.php.net/note/delete/126078/useless
Del: bad code -- https://main.php.net/note/delete/126078/bad+code
Del: spam -- https://main.php.net/note/delete/126078/spam
Del: non-english -- https://main.php.net/note/delete/126078/non-english
Del: in docs -- https://main.php.net/note/delete/126078/in+docs
Del: other reasons-- https://main.php.net/note/delete/126078
Reject -- https://main.php.net/note/reject/126078
Search -- https://main.php.net/manage/user-notes.php