Wie erhalten Sie den neuesten Arraye -Wert in Laravel

$languages = [
  'JAVA',
  'PHP',
  'C++',
  'C#',
  'Python',
];
$totalElements = count($languages);
echo $languages[$totalElements - 1];
Mohamad