This article mainly introduces timestamps in PHP. Friends who need it can refer to it. I hope it will be helpful to everyone.
Recommended tutorial:PHP video tutorial
## Timestamp (timestamp), one can represent one Data is complete, verifiable data that existed before a specific time, usually a sequence of characters that uniquely identifies a certain moment in time. Using data generated by digital signature technology, the signature object includes original file information, signature parameters, signature time and other information. It is widely used in intellectual property protection, contract signing, financial accounting, electronic quotation and bidding, stock trading, etc.
The timestamp refers to the total number of seconds from 00:00:00 GMT on January 1, 1970 (08:00:00 on January 1, 1970, Beijing time) to the present Number of seconds. In layman's terms, a timestamp is a piece of complete and verifiable data that represents the existence of a piece of data at a specific point in time. It is mainly proposed to provide users with an electronic evidence to prove the time when certain user data was generated. In practical applications, it can be used in all aspects including e-commerce and financial activities, and can especially be used to support the "non-repudiation" service of public key infrastructure.PHP gets the timestamp
PHP provides the built-in function time() to get the timestamp of the server’s current time .
Example:
<?php echo time(); ?>
Tips
time() The result obtained is always the current timestamp, so it is an unfixed value. If the timestamp is a negative number, then To push forward from 00:00:00 on January 1, 1970
The above is the detailed content of What is timestamp in php program. For more information, please follow other related articles on the PHP Chinese website!