The getlastmod() function is used to get the time of the last modification of the main script of execution. To show the last modification time of the current page, we use the following.
Syntax:
int|false getlastmod()
Parameters: This function does not accept any parameter.
Return Value: It returns the time of the last modification of the current page. The value returned is a Unix timestamp, suitable for the date(). It returns false on error.
Example 1:
PHP
<?php $txt = "PHP" ; echo "I love $txt! \r\n" ; echo "This page was last modified on " . date ( "d F Y h:i:s " , getlastmod ()); ?> |
I love PHP! This page was last modified on 16 June 2021 07:06:06
Example 2:
PHP
<?php $txt = "Akshit" ; $GFG = " neveropen" ; echo "I am $txt and I love $GFG\r\n" ; echo "This page was Last modified on " . date ( "d F Y h:i:s " , getlastmod ()); ?> |
I am Akshit and I love neveropen This page was Last modified on 16 June 2021 07:10:46
Example 3: The following code is modified using the date(“h:ia”) function.
PHP
<?php $txt = "This is changed text" ; $GFG = " neveropen" ; echo "$txt of $GFG\r\n" ; echo "<br>" ; echo "This page was Last modified on " . date ( "h:ia " , getlastmod ()); ?> |
Output:
This is changed text of neveropen This page was Last modified on 01:48pm
Example 3: The following code modified using the date(“H:i:s a”) function.
PHP
<?php $txt = "This is new date format" ; $GFG = " neveropen" ; echo "$txt of $GFG\r\n" ; echo "<br>" ; echo "This page was Last modified on " . date ( "H:i:s a" , getlastmod ()); ?> |
Output:
This is new date format of neveropen This page was Last modified on 13:57:47 pm
Reference: https://www.php.net/manual/en/function.getlastmod.php
I have been exploring for a bit for any high quality articles or blog posts on this kind of area .
Exploring in Yahoo I ultimately stumbled upon this site.
Studying this info So i’m satisfied to express that I’ve an incredibly just right uncanny
feeling I came upon just what I needed. I so much undoubtedly will
make certain to don?t disregard this web site and give it a glance on a continuing basis.
My web blog :: admiral online casino
Hi there mates, how is all, and what you want to say about this article, in my view its actually awesome in support of me.
my web page: 75r เครดิตฟรี 128
Thank you for the auspicious writeup. It in fact was a amusement account it.
Look advanced to more added agreeable from you!
However, how could we communicate?
Here is my site … ขายไวน์
It’s the best time to make a few plans for the long run and it is time to be happy.
I have read this publish and if I may just I want to counsel you some attention-grabbing things or suggestions.
Maybe you could write next articles referring to
this article. I want to learn more issues approximately it!
Also visit my web page; online casino complaints
Hi friends, how is all, and what you want to
say regarding this article, in my view its genuinely awesome designed for me.
My site – ปันโปร66 เครดิตฟรี ล่าสุด
You really make it seem so easy with your presentation but
I find this matter to be actually something that I think I would never
understand. It seems too complicated and extremely broad for me.
I’m looking forward for your next post, I will try to get the hang of it!
my site fun88เครดิตฟรี
Woah! I’m really loving the template/theme of this website.
It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance” between usability and
appearance. I must say that you’ve done a excellent job with this.
Also, the blog loads extremely quick for me on Safari.
Exceptional Blog!
Feel free to surf to my site … บริการรูดบัตรเครดิต
Hello! Would you mind if I share your blog with my myspace group?
There’s a lot of folks that I think would really
appreciate your content. Please let me know. Thanks
Look at my page – fun88 ทางเข้า
I’d like to find out more? I’d love to find out some additional
information.
Feel free to visit my blog post: dk7 เครดิตฟรี 108 บาท