note 128687 added to class.datetime
| From: | (admin@my-fantasy.ru) | Date: | Thu, 06 Jul 2023 12:46:10 +0000 |
| Subject: | note 128687 added to class.datetime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220648@lists.php.net to get a copy of this message | ||
The better way to choose DateTime vs date it the reason what you can get milliseconds like
<?php
echo (new \DateTime())->format("Y-m-d H:i:s:v");
?>
but perfomance of this will be like 700 000 calls this code per seconds
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.159.168 (proxied: 83.220.237.14)
----
Manual Page -- https://php.net/manual/en/class.datetime.php
Edit -- https://main.php.net/note/edit/128687
Del: integrated -- https://main.php.net/note/delete/128687/integrated
Del: useless -- https://main.php.net/note/delete/128687/useless
Del: bad code -- https://main.php.net/note/delete/128687/bad+code
Del: spam -- https://main.php.net/note/delete/128687/spam
Del: non-english -- https://main.php.net/note/delete/128687/non-english
Del: in docs -- https://main.php.net/note/delete/128687/in+docs
Del: other reasons-- https://main.php.net/note/delete/128687
Reject -- https://main.php.net/note/reject/128687
Search -- https://main.php.net/manage/user-notes.php