This course will be retired on June 1, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
PHP has many built-in functions that can handle complex programming tasks for us. Let PHP work for you by utilizing built-in functionality. We'll be using the date function that we used in the Daily Exercise Program to update copyright dates.
Documentation
Creating a Timestamp
getlastmod() - Gets timestamp of last page modification of current page
filemtime() - Allows you to get the timestamp of the last modification date of a specified file.
mktime() - Allows you to get the timestamp for a specific date and time
strtotime() - Parse about any English textual datetime description into a timestamp
Three Virtues
According to Larry Wall, the original author of the Perl programming language, there are three great virtues of a programmer; Laziness, Impatience and Hubris
Laziness: The quality that makes you go to great effort to reduce overall energy expenditure. It makes you write labor-saving programs that other people will find useful and document what you wrote so you don't have to answer so many questions about it.
Impatience: The anger you feel when the computer is being lazy. This makes you write programs that don't just react to your needs, but actually anticipate them. Or at least pretend to.
Hubris: The quality that makes you write (and maintain) programs that other people won't want to say bad things about.
Quoted from "Programming Perl", 2nd Edition, O'Reilly & Associates, 1996 http://threevirtues.com/
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up