Let PHP Do the Work5:34 with Alena Holligan
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.
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
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/
You need to sign up for Treehouse in order to download course files.Sign up