I want to put a copyright notice in the footer of a web site, but I think it\'s incredibly tacky for the year to be outdated.
How would I make the year update automat
With PHP heading in a more object-oriented direction, I'm surprised nobody here has referenced the built-in DateTime class:
$now = new DateTime(); $year = $now->format("Y");
or one-liner with class member access on instantiation (php>=5.4):
$year = (new DateTime)->format("Y");