How to get the current timestamp in php

angryTom
Release: 2023-02-28 06:32:02
Original
7768 people have browsed it

How to get the current timestamp in php

php gets the number of digits of the current timestamp

php gets the 10 digits of the current timestamp.

Example:

"; echo $dadte; ?>
Copy after login

Effect:

1572399129 2019-10-30 01:32:09
Copy after login

java, the timestamp of javascript is 13 digits, how toimplement php to obtain the 13-digit timestampHere, let’s look at the code

"; echo getUnixTimestamp();
Copy after login

Effect:

1572399322 1572399322925
Copy after login

For more PHP-related knowledge, please visitPHP Chinese website!

The above is the detailed content of How to get the current timestamp in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!