PHP Code for current year

The current year is useful in applications such as copyright notices, typically used in footer of website. This is the simplest possible code for displaying current year:

<?php echo date('Y'); ?>

Comments are closed.