PHP Using array to show last line of file

Using array to show last line of file

<?
$file = file("test.txt");
$count = count($file) - 1;
echo $file[$count];
?>