Php year code snippet

Display year with type 2011-2012

<?php 
$copyYear = 2011; 
$curYear = date('Y'); 
echo $copyYear . (($copyYear != $curYear) ? '-' . $curYear : '');
?>

Simple echo year

<?php echo date("Y") ?>